Package: bibupdate
Usage:usage: bibupdate [-h] [-a] [-c] [-f] [-i IGNORE] [-l LOG] [-m | -M] [-q] [-r][-w LEN] bibtexfile [outputfile]This is a command line tool for updating the entries in aBibTeXfile usingmrlookup. By defaultbibupdatetries to update the entry for each paper
in theBibTeXfile unless the entry already has anmrnumberfield (you can
disable future checking of an entry by giving it an emptymrnumberfield).Options:-a, --all             update or validate ALL BibTeX entries
-c, --check_all       check all bibtex entries against a database
-f, --font_replace    do NOT replace fonts \Bbb, \germ and \scr
-h, --help            show this help message and exit
-i IGNORE, --ignored-fields IGNORE
                      a string of bibtex fields to ignore
-l LOG, --log LOG     log messages to specified file (defaults to stdout)
-q, --quietness       print fewer messages
-r  --replace         replace existing bibtex file
-w {}, --wrap {}      wrap bibtex fields to specified width

-m, --mrlookup        use mrlookup to update bibtex entries (default)
-M, --mathscinet      use mathscinet to update bibtex entries (less flexible)Note:As described below, you should check the new file for errors before deleting the
original version of yourBibTeXfile.By default,bibupdatedoes not change your original database file. Instead, it creates a
new file with the nameupdated_file.bib, if your original file wasfile.bib.
It is also possible to have it replace your current file (use carefully!), or to
specify a new file name.BibTeXis widely used by theLaTeXcommunity to maintain publication databases.
This script attempts to add missing fields to the papers in aBibTeXdatabase
file by queryingmrlookupand getting the missing information from there. This
is not completely routine because to search onmrlookupyou need either the
authors or the title of the article and both of these can have non-standard
representations. If the article is already published then it is also possible to
use the publication year and its page numbers. To search onmrlookupwe:use the authors (can be problematic because of accents and names with von etc)use the page numbers, if they existuse the year only if there are no page numbers and this is NOT a preprintuse the title if there are no page numbers (or this is a book)If there is a unique (good, non-fuzzy) match frommrlookupthenbibupdatereplaces all of the current fields with those frommrlookup, except for the
citation key. The values of any fields that are not specified bymrlookup, such
aseprintfields, are retained. By default, a message is printed whenever
existing fields in the database are changed. If the title of the retrieved paper
does not (fuzzily) match that of the original article then the entry is NOT
updated and a warning message is printed.Although some care is taken to make sure that the newBibTeXentries correspond
to the same paper that the original entry referred to there is always a (small?)
chance the new entry corresponds to an entirely different paper. In my
experience this happens rarely, and mostly with unpublished manuscripts. In any
case, before you delete your originalBibTeXfileyou are strongly advised to
check the updated file BibTeX file carefully for errors!To help the user to compare the updated fields for each entry in theBibTeXfile the program prints a detailed list of all changes that are made to existingBibTeXfields (any new fields that are added are not printed). Oncebibupdatehas finished running it is recommended that you compare the old and new versions
of your database using programs likediffandtkdiff.Asbibupdatecallsmrlookupthis program will only be useful if you have
papers in your database that are listed inMathSciNet. As described below it is
also possible to callMathSciNetdirectly, however, this is less flexible
because themrnumberfield for each paper is required.I wrote this script because I wanted to automatically add links to journals, thearXivand DOIs to the bibliographies of my papers usinghyperref. This script
allowed me to add the missing urls and DOI fields to myBibTeXdatabase. As a
bonus the script helped me to correct many minor errors that had crept into myBibTeXfile over the years (for example, incorrect page numbers and publication
years). Now I use the program to automatically update the preprint entries in my
database when the papers appear inMathSciNetafter they are published.Options and their defaults-a,--allUpdate or validate ALL BibTeX entriesBy defaultbibupdateonly checks eachBibTeXentry with the mrlookup
database if the entry doesnothave anmrnumberfield. With this switch
all entries are checked and updated.-c –check_all  Check/validate all bibtex entries against a databasePrints a list of entries in the BibTeX file that have fields different from
those given by the corresponding database. The original BibTeX file is not
changed.-f,--font_replaceDo not replace fonts \germ and \scrTheBibTeXentries generated bymrlookupuse \Bbb, \germ and \scr for the
\mathbb, \mathfrak and \mathscr fonts. By default, in thetitlefields,
these fonts specifications are automatically changed to the following moreLaTeXfriendly fonts:\Bbb X  –> \mathbb{X}\scr X  –> \mathcal{X}\germ X –> \mathfrak{X}The -f optiondisablesthese substitutions.-iIGNORE,--ignored-fields=IGNOREA string ofBibTeXfields to ignore when writing the updated fileBy defaultbibupdateremoves the following fields from eachBibTeXentry:codenmrreviewerfjournalissnThis list can be changed using the -i command line option:bibupdate -i "coden fjournal" file.bib   # ignore coden and fjournal
bibupdate -i coden -i fjournal file.bib  # ignore coden and fjournal
bibupdate -i "" file.bib                 # do not ignore any fields-lLOG,--logLOGLog output to file (defaults to stdout)Specify a log filename to use for thebibupdatemessages.-m –mrlookup     Use mrlookup to update bibtex entries (default)-M –mathscinet   Use mathscinet to update bibtex entriesBy defaultmrlookupis used to update theBibTeXentries in the database.
This has the advantage of being a free service provided by the American
Mathematical Society. A second advantage is the more flexible searching is
possible whenmrlookupis used. It is also possible to updateBibTeXentries usingMathSciNet, however, these searches are currently only possible
using themrnumberfield (so this option only does something if combined
with the –all option or the -check-all-option).-q,--quietnessPrint fewer messagesThere are three levels of verbosity in howbibupdatedescribes the changes that
it is making. These are determined by the q-option as follows:bibupdate     bibfile.bib    (Defalt) Report all changes
bibupdate -q  bibfile.bib    (Warning mode) Only print entries that are changed
bibupdate -qq bibfile.bib    (Quiet mode) Only printer error messagesBy default all changes are printed (to stdout, although a log file can be
specified by the -l option). In the default modebibupdatewill tell you what
entries it changes and when itis notable to find the paper on the database
(either because there are no matches or because there are too many). If it is
not able to find the paper andbibupdatethinks that the paper is not a
preprint then it will mark the missing entry with an exclamation mark, to
highlight that it thinks that it should have found the entry inmrlookupbut
failed. Here is some sample output:------------------------------
? did not find Webster:CanonicalBasesHigherRep=Canonical bases and higher representatio
++++++++++++++++++++++++++++++
+ updating Weyl=
+ publisher: Princeton University Press
+         -> Princeton University Press, Princeton, NJ
------------------------------
? did not find Williamson:JamesLusztig=Schubert calculus and torsion
------------------------------
! did not find QSAII=On Quantitative Substitutional AnalysisEachbibtexentry is identified by the citation key and the (first 50
characters of the sanitised) document title, as specified by your database. Of
the three missed entries above,bibupdatethinks that the first and third are
preprints (they are not marked with an !) and  that the final article should
already have been published. With the entry thatbibupdatefound, only the
publisher field was changed to include the city of publication.Inwarning mode, with the -q option, you are “warned” whenever changes are
made to an entry or when the paper is not found in the external datbase. That
is, when papers are found (with changes) or when they are missed andbibupdatethinks that they are not preprints. Inquiet mode, with the -qq
option, the program only reports when something goes wrong.-r--replaceReplace the existing bibtex file with the updated versionReplace the existingBibTeXfile with the updated file. A backup version of
the originalBibTeXis made with a .bak extension. it is also possible to
specify the output filename as the last argument to bibupdate.-w WRAP_LEN –wrap WRAP_LEN    wrap bibtex fields to specified widthLimits the maximum line length in the outputBibTeXfile. In theory this is
supposed to make it easier to compare the updatedBibTeXfile with the
original one, however, in practise this doesn’t always work.Known issuesThere are a small number of cases wherebibupdatefails to correctly identify
papers that are listed inMathSciNet. These failures occur for the following
reasons:Apostrophes: Searching for a title that contains, for example, “James’s Conjecture”
confusesmrlookup.Ambiguous spelling: Issues arise when there are multiple ways to spell a
given author’s name. This can often happen if the surname involves accents
(such as Koenig and K"onig). Most of the time accents themselves are not a
problem because the AMS isLaTeXaware.Pages numbers: electronic journals, in particular, often have strange page
numbers (for example “Art. ID rnm032, 24”).bibupdateassumes that page
numbers are always given in the format like 4–42.Occasionally MathReviews combines two or more closely related articles. This
makes it difficult to search for them.All of these problems are due to idiosyncrasies withmrlookupso there is not
much that we can do about them.InstallationYou need to havePythoninstalled. In principle, this program should work on
any system that supportsPython, however, I only promise that it will work
on an up-to-date mac or Linux system. In the event that it does not install I
may not be able to help you as I will not have access to your system.From the command line type:pip install bibupdateInstead of pip, you should also be able to use easy_install. The program should
run on python 2.7 and 2.8…I haven’t tried python3. You can also clone ordownloadthe git repository and work directly with the source.SupportThis program is being made available primarily on the basis that it might be
useful to others. I wrote the program in my spare time and I will support it in
my spare time, to the extent that I will fix what I consider to be serious
problems and I may implement feature requests. Ultimately, however, my family,
research, teaching and administrative duties will have priority.To doMore intelligent searches usingMathSciNet.Interface to thearXiv? In principle, this is easy to do although,
ultimately, it would probably not work because thearXivblocks frequent
requests from the same IP address in order to discourage robots.AUTHORAndrew MathasbibupdateVersion 1.2. Copyright (C) 2012-14GNU General Public License, Version 3, 29 June 2007This program is free software: you can redistribute it and/or modify it under
the terms of the GNU_General Public License (GPL) as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.