The truth is rarely pure and never simple

Mendeley and Subversion

Although mendeley is convenient, it lacks proper support for documents created using version control systems like subversion. Usually, it is a bad idea to put the BibTeX file of the project under version control. Using the API of mendeley, there is way to

  1. Avoid duplicate entries with the same doi but different citation keys.
  2. Avoid manual checking whether a local BibTeX entry has been added to the mendeley database.
  3. Avoid searching for the proper citation keys for legacy documents.
  4. Avoid searching missing doi entries in the local BibTeX file.
  5. Automatically copy mendeley data to your local BibTeX file.

Especially the last point is useful: only use a citation key in your LaTeX document and run the script below. It will update your local mendeley-export.bib. This script only works on BibTeX files of this name.

How to install

  1. Download the script, extract the files into any folder that is part of your $PYTHONPATH. Please note that the folder you select will be used as storage for the cached data, as well.
  2. Make sure that you have python installed. Your installation has to include oauth2, requests and mendeley_client.
  3. Get your own API key and add it to config.json.
  4. Properly set the variable group_to_sync. This has to be one group name from Mendeley.

How to use

  1. Enter the directory with your LaTeX files and call bibsync.py. When it is called for the first time, it will download the metadata of the entire document group after you have confirmed the access via OAuth. This will take some time.
  2. If the file mendeley-export.bib does not exist, it will be created. bibsync.py will only work on this file.
  3. You should get something like this as output:

bibsync

Leave a comment

Your email address will not be published.