Crates.io | inspirer |
lib.rs | inspirer |
version | 0.1.1 |
source | src |
created_at | 2017-06-12 05:56:16.084067 |
updated_at | 2017-10-01 08:23:56.202711 |
description | For working with LaTeX, inspirehep.net, and BibTeX/BibLaTeX |
homepage | |
repository | https://github.com/musoke/inspirer |
max_upload_size | |
id | 18668 |
size | 63,444 |
For fetching BibTeX entries from INSPIRE and ADS.
This currently a rust clone of some features from inspiretools, with the added ability to fetch BibTeX entries from ADS.
inspirer is available as a snap. This may be the easiest way to install inspirer and keep it updated.
Ubuntu 16.10+:
apt install snapd
snap install inspirer
Then you can run the binaries:
inspirer.aux2bib file.aux
inspirer.blg2bib file.blg
For convenience, you may wish to create shorter aliases. For example,
snap alias inspirer.aux2bib aux2bib.
allows one to simply run aux2bib
instead of inspirer.aux2bib
.
The snap should be updated daily by automatic builds on
Launchpad.
Enable the edge
channel to get the latest, possibly less tested builds:
snap refresh inspirer --edge
Binaries will be available to download from the GitHub release page. This would require manual updating.
First, install rust.
To install from crates.io:
cargo install inspirer
To install the latest version from git:
cargo install --git https://github.com/musoke/inspirer
cargo install --git https://gitlab.com/musoke/inspirer
I haven't really tested with Windows, but do have minimal tests on Appveyor which seem to pass sometimes.
To read from file test_bibtex.aux
(usually corresponding to a LaTeX file
test_bibtex.tex
) and write to stdout
:
aux2bib test_bibtex.aux
Either of these will append the fetched BibTeX entries to a file:
aux2bib test_bibtex.aux bibliography.bib
aux2bib test_bibtex.aux >> bibliography.bib
This will check what references appear in test_bibtex.tex
, check if they look
like the style used by INSPIRE or ADS, and if so, fetch the corresponding
BibTeX records.
blg2bib
works analogously but takes a BibTeX or BibLaTeX log as input.
This allows retrieval of only entries which are not currently in the database,
which may be significantly faster if you have a lot of references.
blg2bib test_bibtex.blg bibliography.bib
There are some sample input files in example_files
. If you have cargo & rustc
installed you can test on them like so:
cargo run --bin aux2bib example_files/test_bitex.aux
cargo run --bin blg2bib example_files/test_bitex.blg
cargo run --bin blg2bib example_files/test_biber.blg
not yet parallelized
overly verbose logging
7 MB binaries
haven't tried fuzzing
Apache Licence 2.0