6 releases

0.1.5 Apr 15, 2021
0.1.4 Apr 15, 2021
0.1.3 Mar 13, 2021
0.1.2 Sep 7, 2020
0.1.0 Aug 31, 2020

#3 in #arxiv

Download history 19/week @ 2023-12-13 22/week @ 2023-12-20 16/week @ 2023-12-27 50/week @ 2024-01-03 54/week @ 2024-01-10 57/week @ 2024-01-17 55/week @ 2024-01-24 38/week @ 2024-01-31 39/week @ 2024-02-07 54/week @ 2024-02-14 69/week @ 2024-02-21 58/week @ 2024-02-28 73/week @ 2024-03-06 42/week @ 2024-03-13 69/week @ 2024-03-20 92/week @ 2024-03-27

284 downloads per month
Used in 4 crates (2 directly)

MIT license

13KB
252 lines

Welcome to arxiv-rs 👋

Crates.io Documentation License

This is a wrapper crate for the arXiv API

Usage

Add dependencies to Cargo.toml

[dependencies]
arxiv-rs = "0.1.5"
tokio = { version = "1.3.0", features = ["full"]}
anyhow = "1.0.32"

Fetch the paper information and save it as a pdf

use anyhow::Result;
use arxiv::ArxivQueryBuilder;

#[tokio::main]
async fn main() -> Result<()> {
    let query = ArxivQueryBuilder::new()
        .search_query("cat:cs.CL")
        .start(0)
        .max_results(5)
        .sort_by("submittedDate")
        .sort_order("descending")
        .build();
    let arxivs = arxiv::fetch_arxivs(query).await?;
    for arxiv in arxivs {
        arxiv.fetch_pdf(&arxiv.title).await?;
    }
    Ok(())
}

You can easily build the query using the macro

use arxiv::query;

let query = query!(
    search_query = "cat:cs.CL",
    start = 0,
    max_results = 5,
    sort_by = "submittedDate",
    sort_order = "descending"
);

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator

Dependencies

~4–17MB
~239K SLoC