A simple python CLI script to query inspirehep.net and populate bibliography databases.
An iNSPIRE CLI script using its REST API.
This script requires python 3.9
or above.
The requirements can be installed via
python -m pip install -r requirements.txt
or manually inspect the requirements.txt
file.
Simply pass an iNSPIRE query to the command line and use the --display
(-d
) option to control the output:
When there are multiple matches, --size
controls the number of records to retrieve and --sort
the sorting order. The wanted entries can be easily selected from the menu:
The selected entries can be added to an existing bibliography by specifying the file with --bib
(-b
). Omitting the file name will use the default BibTeX file specified in the configuration:
We can also update all records of an existing BibTeX file by adding the --update
(-u
) option:
In the configuration file, you can also specify a default folder for PDF downloads. The option --pdf
will try to find the PDF from arXiv and download it to that folder.
Check out help dialogue for usage and more information.
inspire.py -h