ADS Management

Note

To enable the ADS functionality, first you need to obtain an ADS token [1], and set it into the ads_tokend config parameter. To do this:

  1. Create an account and login into the new ADS system.

  2. Get your token (or generate a new one) from here.

  3. Set the ads_token bibmanager parameter:

# Set ads_token to 'my_ads_token':
bibm config ads_token my_ads_token


ads-add

Add entries from ADS by bibcode into the bibmanager database.

Usage

bibm ads-add [-h] [-f] [-o] [bibcode key] [tag1 [tag2 ...]]

Description

This command add BibTeX entries from ADS by specifying pairs of ADS bibcodes and BibTeX keys.

Executing this command without arguments (i.e., bibm ads-add) launches an interactive prompt session allowing the user to enter multiple bibcode, key pairs.

By default, added entries replace previously existent entries in the bibmanager database.

With the optional arguments -f/--fetch or -o/--open, the code will attempt to fetch and fetch/open (respectively) the associated PDF files of the added entries.
(New since version 1.2.7)
Either at bibm ads-add or later via the prompt you can specify tags for the entries to be add.
(New since version 1.4)

Options

bibcode
The ADS bibcode of an entry.

key
BibTeX key to assign to the entry.

tags
Optional BibTeX tags to assign to the entries.
(New since version 1.4)

-f, -\-fetch
Fetch the PDF of the added entries.
(New since version 1.2.7)

-o, -\-open
Fetch and open the PDF of the added entries.
(New since version 1.2.7)

-h, -\-help
Show this help message and exit.

Examples

# Let's search and add the greatest astronomy PhD thesis of all times:
bibm ads-search
(Press 'tab' for autocomplete)
author:"^payne, cecilia" doctype:phdthesis

Title: Stellar Atmospheres; a Contribution to the Observational Study of High
       Temperature in the Reversing Layers of Stars.
Authors: Payne, Cecilia Helena
adsurl:  https://ui.adsabs.harvard.edu/abs/1925PhDT.........1P
bibcode: 1925PhDT.........1P
# Add the entry to the bibmanager database:
bibm ads-add 1925PhDT.........1P Payne1925phdStellarAtmospheres

The user can optionally assign tags or request to fetch/open PDFs:

# Add the entry and assign a 'stars' tag to it:
bibm ads-add 1925PhDT.........1P Payne1925phdStellarAtmospheres stars


# Add the entry and fetch its PDF:
bibm ads-add -f 1925PhDT.........1P Payne1925phdStellarAtmospheres

# Add the entry and fetch/open its PDF:
bibm ads-add -o 1925PhDT.........1P Payne1925phdStellarAtmospheres

Alternatively, the call can be done without arguments, which allow the user to request multiple entries at once (and as above, set tags to each entry as desired):

# A call without bibcode,key arguments (interactive prompt):
bibm ads-add
Enter pairs of ADS bibcodes and BibTeX keys (plus optional tags)
Use one line for each BibTeX entry, separate fields with blank spaces.
(press META+ENTER or ESCAPE ENTER when done):
1925PhDT.........1P Payne1925phdStellarAtmospheres stars

# Multiple entries at once, assigning tags (interactive prompt):
bibm ads-add
Enter pairs of ADS bibcodes and BibTeX keys (plus optional tags)
Use one line for each BibTeX entry, separate fields with blank spaces.
(press META+ENTER or ESCAPE ENTER when done):
1925PhDT.........1P Payne1925phdStellarAtmospheres stars
1957RvMP...29..547B BurbidgeEtal1957rvmpStellarSynthesis stars nucleosynthesis

ads-update

Update bibmanager database cross-checking entries with ADS.

Usage

bibm ads-update [-h] [update_keys]

Description

This command triggers an ADS search of all entries in the bibmanager database that have a bibcode. Replacing these entries with the output from ADS. The main utility of this command is to auto-update entries that were added as arXiv version, with their published version.

For arXiv updates, this command updates automatically the year and journal of the key (where possible). This is done by searching for the year and the string ‘arxiv’ in the key, using the bibcode info. For example, an entry with key ‘NameEtal2010arxivGJ436b’ whose bibcode changed from ‘2010arXiv1007.0324B’ to ‘2011ApJ…731…16B’, will have a new key ‘NameEtal2011apjGJ436b’. To disable this feature, set the update_keys optional argument to ‘no’.

Options

update_keys
Update the keys of the entries. (choose from: {no, arxiv}, default: arxiv).

-h, -\-help
Show this help message and exit.

Examples

Note

These example outputs assume that you merged the sample bibfile already, i.e.: bibm merge ~/.bibmanager/examples/sample.bib

# Look at this entry with old info from arXiv:
bibm search -v
author:"^Beaulieu"

Title: Methane in the Atmosphere of the Transiting Hot Neptune GJ436b?, 2010
Authors: {Beaulieu}, J.-P.; et al.
bibcode:   2010arXiv1007.0324B
ADS url:   http://adsabs.harvard.edu/abs/2010arXiv1007.0324B
arXiv url: http://arxiv.org/abs/arXiv:1007.0324
key: BeaulieuEtal2010arxivGJ436b


# Update bibmanager entries that are in ADS:
bibm ads-update

Merged 0 new entries.
(Not counting updated references)
There were 1 entries updated from ArXiv to their peer-reviewed version.
These ones changed their key:
BeaulieuEtal2010arxivGJ436b -> BeaulieuEtal2011apjGJ436b


# Let's take a look at this entry again:
bibm search -v
author:"^Beaulieu"

Title: Methane in the Atmosphere of the Transiting Hot Neptune GJ436B?, 2011
Authors: {Beaulieu}, J. -P.; et al.
bibcode:   2011ApJ...731...16B
ADS url:   https://ui.adsabs.harvard.edu/abs/2011ApJ...731...16B
arXiv url: http://arxiv.org/abs/1007.0324
key: BeaulieuEtal2011apjGJ436b

Note

There might be cases when one does not want to ADS-update an entry. To prevent this to happen, the user can set the freeze meta-parameter through the bibm edit command (see edit).


References