The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::arxiv2bib - Extract bibliographic data from the arXiv API

SYNOPSIS

    arxiv2bib [options] [args]

    arxiv2bib au:author1 AND au:author2 AND ti:title

    arxiv2bib --raw "(au:author1 AND ti:title) OR au:author2"

    arxiv2bib --amsrefs au:author1 OR ti:title

    arxiv2bib --sortBy=relevance --sortOrder=ascending --max_results=20 au:author1 AND au:author2

DESCRIPTION

The script/arxiv2bib executable provided by the distribution extracts bibliographic information using the arXiv API.

It defaults to the BibTeX format for entries, but can optionally return AMSRefs entries or just dump raw info (a Perl hash).

INSTALLATION

Using cpanm: just plain

    $ cpanm App::arxiv2bib

should work once it's been indexed by CPAN. For more up-to-date versions clone this repo, cd into it, and then:

    $ cpanm .

Manual install:

    $ perl Makefile.PL
    $ make
    $ make install

OPTIONS

    -h | --help         usage examples and a breakdown of options/arguments
         --man          full documentation
    -n | --dry          only dump the the Mojo request object your options have formed
    -v | --verbose      dump the entire Mojo response object you've received

         --amsrefs      return entries in AMSRefs format instead of the BibTeX default
         --raw          dump a hash containing bibliographic info (authors, etc.), unformatted

    -l | --label        a string that will be used as the label of the BibTeX entry in place of the default (which is the arXiv identifier)
                        only really useful if you're interested in one of the entries being returned, since it labels all entries identically

The rest of the options go hand-in-hand with identically-named query parameters in the API, so that will be essential documentation.

    --sortBy            "submittedDate" (default), "relevance" or "lastUpdatedDate"
    --sortOrder         "descending" (default) or "ascending"
    --id_list           comma-separated list of arXiv identifiers, e.g. 2106.16211,2106.16119,2106.15900; defaults to ""
    --start             index of the first displayed entry in the list returned by the search; defaults to 0
    --max_results       maximal number of displayed returned entries; defaults to 200

ARGUMENTS

The rest of the arguments constitute the search_query, built as described in the API docs.

The individual lexemes are of the form prefix:string, where the prefix is one of the following (with the second column indicating what the prefix stands for):

    ti    Title
    au    Author
    abs   Abstract
    co    Comment
    jr    Journal Reference
    cat   Subject Category
    rn    Report Number
    id    Id (use id_list instead)
    all   All of the above

The lexemes can be connected by the logical operators AND, OR and ANDNOT. So a script call might look like this:

    arxiv2bib au:author1 AND au:author2 ANDNOT au:author3

That'll search for papers coauthored by author1 and author2 but not author3.

You can also group your search terms parenthetically for more sophisticated logical constructs:

    arxiv2bib "(au:author1 AND ti:title1) OR (au:author2 AND ti:title2)"

I had to enclose that in quotes though, because otherwise the shell gets confused.