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] [bibcode key]

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.

Options

bibcode
The ADS bibcode of an entry.

key
BibTeX key to assign to the entry.

-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

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

[1]https://github.com/adsabs/adsabs-dev-api#access