This is a wrapper crate for the arXiv API
Add dependencies to Cargo.toml
toml
[dependencies]
arxiv-rs = "0.1.1"
async-std = { version = "1.6.0", features = ["attributes"] }
anyhow = "1.0.32"
Fetch the paper information and save it as a pdf
```rust use anyhow::Result; use arxiv::ArxivQueryBuilder;
async fn main() -> Result<()> { let query = ArxivQueryBuilder::new() .searchquery("cat:cs.CL") .start(0) .maxresults(5) .sortby("submittedDate") .sortorder("descending") .build(); let arxivs = arxiv::fetcharxivs(query).await?; for arxiv in arxivs { arxiv.fetchpdf(&arxiv.title).await?; } Ok(()) } ```
You can easily build the query using the macro
```rust use arxiv::query;
let query = query!( searchquery = "cat:cs.CL", start = 0, maxresults = 5, sortby = "submittedDate", sortorder = "descending" ); ```
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator