PDF Management¶
Since version 1.2, bibmanager
also doubles as a PDF database. The
following commands describe how to fetch PDF entries from ADS, or
manually link and open the PDF files associated to the bibmanager
database. All PDF files are stored in the home
/pdf folder
(see config, for more info to set home
).
PDF files can also be manually linked to the database entries via the
bibm edit
command (see Meta-Information).
fetch¶
Fetch a PDF file from ADS.
Usage
bibm fetch [-h] [-o] [keycode] [filename]
Description
This command attempts to fetch from ADS the PDF file associated to a
Bibtex entry in the bibmanager
database. The request is made to the
Journal, then the ADS server, and lastly to ArXiv until one succeeds.
The entry is specified by either the BibTex key or ADS bibcode, these
can be specified on the initial command, or will be queried after
through the prompt (see examples).
If the output PDF filename is not specified, the routine will guess a name with this syntax: LastnameYYYY_Journal_vol_page.pdf
Options
Examples
Note
These examples assume that you have this entry into the database: Rubin, V. C. et al. (1980), ApJ, 238, 471. E.g., with: bibm ads-add 1980ApJ...238..471R RubinEtal1980apjGalaxiesRotation
A bibm fetch
call without arguments triggers a prompt search with
auto-complete help:
# Fetch PDF for entry by BibTex key:
bibm fetch RubinEtal1980apjGalaxiesRotation
Fetching PDF file from Journal website:
Request failed with status code 404: NOT FOUND
Fetching PDF file from ADS website:
Saved PDF to: '/home/user/.bibmanager/pdf/Rubin1980_ApJ_238_471.pdf'.
To open the PDF file, execute:
bibm open RubinEtal1980apjGalaxiesRotation
# Fetch PDF fir entry by ADS bibcode:
bibm fetch 1980ApJ...238..471R
...
Fetching PDF file from ADS website:
Saved PDF to: '/home/user/.bibmanager/pdf/Rubin1980_ApJ_238_471.pdf'.
To open the PDF file, execute:
bibm open RubinEtal1980apjGalaxiesRotation
# Fetch and set the output filename:
bibm fetch 1980ApJ...238..471R Rubin1980_gals_rotation.pdf
...
Fetching PDF file from ADS website:
Saved PDF to: '/home/user/.bibmanager/pdf/Rubin1980_gals_rotation.pdf'.
To open the PDF file, execute:
bibm open RubinEtal1980apjGalaxiesRotation
A bibm fetch
call with the -o/--open
flag automatically opens
the PDF file after a successful fetch:
# Use prompt to find the BibTex entry (and open the PDF right after fetching):
bibm fetch RubinEtal1980apjGalaxiesRotation -o
Fetching PDF file from Journal website:
Request failed with status code 404: NOT FOUND
Fetching PDF file from ADS website:
Saved PDF to: '/home/user/.bibmanager/pdf/Rubin1980_ApJ_238_471.pdf'.
open¶
Open the PDF file of a BibTex entry in the database.
Usage
bibm open [-h] [keycode]
Description
This command opens the PDF file associated to a Bibtex entry in the
bibmanager
database. The entry is specified by either its BibTex key,
its ADS bibcode, or its PDF filename. These can be specified on the
initial command, or will be queried through the prompt (with
auto-complete help).
bibmanager
will ask if the user wants to fetch the PDF
from ADS.Options
Examples
# Open setting the BibTex key:
bibm open RubinEtal1980apjGalaxiesRotation
# Open setting the ADS bibcode:
bibm open 1980ApJ...238..471R
# Open setting the PDF filename:
bibm open Rubin1980_ApJ_238_471.pdf
# Use the prompt to find the BibTex entry:
bibm open
Syntax is: key: KEY_VALUE
or: bibcode: BIBCODE_VALUE
or: pdf: PDF_VALUE
(Press 'tab' for autocomplete)
key: RubinEtal1980apjGalaxiesRotation
pdf¶
Link a PDF file to a BibTex entry in the database.
Usage
bibm pdf [-h] [keycode pdf] [name]
Description
This command manually links an existing PDF file to a Bibtex entry in
the bibmanager
database. The PDF file is moved to the ‘home/pdf’
folder (see config).
The entry is specified by either the BibTex key or ADS bibcode, these
can be specified on the initial command, or will be queried after
through the prompt (see examples).
Options
Examples
Say you already have an article’s PDF file here: ~/Downloads/Rubin1980.pdf
# Link a downloaded PDF file to an entry:
bibm pdf 1980ApJ...238..471R ~/Downloads/Rubin1980.pdf
Saved PDF to: '/home/user/.bibmanager/pdf/Rubin1980.pdf'.
# Link a downloaded PDF file (guessing the name from BibTex):
bibm pdf 1980ApJ...238..471R ~/Downloads/Rubin1980.pdf guess
Saved PDF to: '/home/user/.bibmanager/pdf/Rubin1980_ApJ_238_471.pdf'.
# Link a downloaded PDF file (renaming the file):
bibm pdf 1980ApJ...238..471R ~/Downloads/Burbidge1957.pdf RubinEtal_1980.pdf
Saved PDF to: '/home/user/.bibmanager/pdf/RubinEtal_1980.pdf'.
# Use the prompt to find the BibTex entry:
bibm pdf
Syntax is: key: KEY_VALUE PDF_FILE FILENAME
or: bibcode: BIBCODE_VALUE PDF_FILE FILENAME
(output FILENAME is optional, set it to guess for automated naming)
key: RubinEtal1980apjGalaxiesRotation ~/Downloads/Rubin1980.pdf
Saved PDF to: '/home/user/.bibmanager/pdf/Rubin1980.pdf'.