Crates.io | arxivlens |
lib.rs | arxivlens |
version | 0.1.0 |
source | src |
created_at | 2024-07-31 23:08:15.524005 |
updated_at | 2024-07-31 23:08:15.524005 |
description | Terminal User Interface (TUI) for exploring arXiv |
homepage | https://github.com/AlMrvn/arxivlens |
repository | https://github.com/AlMrvn/arxivlens |
max_upload_size | |
id | 1321385 |
size | 288,737 |
ArxivLens is a Rust-based terminal user interface (TUI) application that helps you browse and explore new abstracts on the arXiv repository. The name was suggested by the AI assistant, Gemini!
This project arose from a desire to create a convenient way to explore the latest arXiv entries in specific categories (like "quant-ph"). The goal was to replicate the experience of browsing submitted manuscripts on the arXiv website, allowing you to scan through abstracts and search for keywords or familiar authors. Additionally, it served as a platform for myself to experiment and learn with the Rust programming language.
If '$XDG_CONFIG_HOME/arxivlens/config.toml' exists, it will be read and used. If '$XDG_CONFIG_HOME' is not set, '~/.cache/' will be used instead. Example of config file:
[query]
category = "quant-ph"
[highlight]
authors = ["Schrodinger", "Becquerel"]
keywords = ["quantum", "Error Correction"]
Here is the helper:
Terminal User Interface to explore arXiv
Usage: arxivlens [OPTIONS]
Options:
-a, --author <AUTHOR> Name of the author to look
-c, --category <CATEGORY> Category to look [default: quant-ph]
-h, --help Print help
-V, --version Print version
To install this as a CLI, you'll need Rust installed then copy this repo and use cargo to compile the project inot your path:
cargo install --path .
You will then be able to use the command arxivlens
from any place in your system
This project is licensed under the MIT license.
I used the simple template from ratatui. the project is organized as following:
src/
├── arxiv_parsing.rs -> parsing of the XML returned by the arXiv API and search query
├── arxiv_query.rs -> API for the arXiv API. Construction of the query url and
├── app.rs -> holds the state and application logic for the TUI
├── config.rs -> handles the configuration for the query and the highlights
├── event.rs -> handles the terminal events (key press, mouse click, resize, etc.)
├── handler.rs -> handles the key press events and updates the application
├── lib.rs -> module definitions
├── main.rs -> entry-point
├── tui.rs -> initializes/exits the terminal interface
└── ui.rs -> renders the widgets / UI