Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 1.41 KB

README.md

File metadata and controls

62 lines (40 loc) · 1.41 KB

get_bibtex.py

A command-line-based program to fetch BibTeX entries using Crossref.

Setup

  1. Ensure you have Python 3 installed on your machine. You can download it from here.
  2. Clone this repository to your local machine.
  3. Copy the get_bibtex.py file to some directory in your PATH.

Requirements

This program requires the following third-party Python packages:

  • requests
  • Optional: pyperclip

You can install these packages using pip:

pip install requests pyperclip

Help

You can get a list of all the command-line arguments by running the script with the -h or --help option:

get_bibtex.py -h

Basic Usage

Search for works by author 'John Doe' and print the top 20 matches:

get_bibtex.py -a 'John Doe'

Specify some keywords from the title of the paper to search for:

get_bibtex.py -a 'John Doe' -k 'machine learning'

Change the number of matches to show (for example, 10):

get_bibtex.py -a 'John Doe' -k 'machine learning' -m 10

Use the -c argument to save the BibTeX entry to the clipboard:

get_bibtex.py -a 'John Doe' -k 'machine learning' -m 10 -c

Already know which match you want (e.g. the second)? Select that match and only get the BibTeX entry:

get_bibtex.py -a 'John Doe' -k 'machine learning' -m 10 -c -s 2