Package: reffix
reffix: Fixing BibTeX reference list with DBLP API 🔧➡️Reffixis a simple tool for improving the BibTeX list of references in your paper. It can fix several common errors such as incorrect capitalization, missing URLs, or using arXiv pre-prints instead of published version.➡️Reffixqueries theDBLP API, so it does not require any local database of papers.➡️Reffixuses a conservative approach to keep your bibliography valid.➡️ The tool is developed with NLP papers in mind, but it can be used on any BibTeX list of references containing computer science papers present onDBLP.Quickstart👉️ You can now installreffixfromPyPI:pip install -U reffix
reffix [BIB_FILE]See the Installation and Usage section below for more details.ExampleBefore the update (Google Scholar):❎ arXiv version❎ no URL❎ capitalization lost{  
    'ENTRYTYPE': 'article',
    'ID': 'duvsek2020evaluating',
    'author': 'Du{\\v{s}}ek, Ond{\\v{r}}ej and Kasner, Zden{\\v{e}}k',
    'journal': 'arXiv preprint arXiv:2011.10819',
    'title': 'Evaluating semantic accuracy of data-to-text generation with '
             'natural language inference',
    'year': '2020'
}After the update (DBLP + preserving capitalization):✔️ ACL version✔️ URL included✔️ capitalization preserved{   
    'ENTRYTYPE': 'inproceedings',
    'ID': 'duvsek2020evaluating',
    'author': 'Ondrej Dusek and\nZdenek Kasner',
    'bibsource': 'dblp computer science bibliography, https://dblp.org',
    'biburl': 'https://dblp.org/rec/conf/inlg/DusekK20.bib',
    'booktitle': 'Proceedings of the 13th International Conference on Natural '
                 'Language\n'
                 'Generation, {INLG} 2020, Dublin, Ireland, December 15-18, '
                 '2020',
    'editor': 'Brian Davis and\n'
              'Yvette Graham and\n'
              'John D. Kelleher and\n'
              'Yaji Sripada',
    'pages': '131--137',
    'publisher': 'Association for Computational Linguistics',
    'timestamp': 'Mon, 03 Jan 2022 00:00:00 +0100',
    'title': '{Evaluating} {Semantic} {Accuracy} of {Data-to-Text} '
             '{Generation} with {Natural} {Language} {Inference}',
    'url': 'https://aclanthology.org/2020.inlg-1.19/',
    'year': '2020'
}Main featuresCompleting references–reffixqueries the DBLP API with the paper title and the first author's name to find a complete reference for each entry in the BibTeX file.Replacing arXiv preprints–reffixcan try to replace arXiv pre-prints with the version published at a conference or in a journal whenever possible.Preserving titlecase– in order topreserve correct casing,reffixwraps individual uppercased words in the paper title in curly brackets.Conservative approach:the original .bib file is preservedno references are deletedpapers are updated only if the title and at least one of the authors matchthe version of the paper corresponding to the original entry should be selected firstInteractive mode– you can confirm every change manually.The package usesbibtexparserfor parsing the BibTex files,DBLP APIfor updating the references, and thetitlecasepackage for optional extra titlecasing.InstallationYou can installreffixfromPyPI:pip install reffixFor development, you can install the package in the editable mode:pip install -e .[dev]UsageRun the script with the .bib file as the first argument:reffix [IN_BIB_FILE]By default, the program will run in batch mode, save the outputs in the file with an extra ".fixed" suffix, and keep the arXiv versions.The following command will run reffix in interactive mode, save the outputs to a custom file, and replace arXiv versions:reffix [IN_BIB_FILE] -o [OUT_BIB_FILE] -i -aFlagsshortlongdescription-o--outOutput filename. If not specified, the default filename<original_name>.fixed.bibis used.-i--interactInteractive mode. Every replacement of an entry with DBLP result has to be confirmed manually.-a--replace-arxivReplace arXiv versions. If a non-arXiv version (e.g. published at a conference or in a journal) is found at DBLP, it is preferred to the arXiv version.-t--force-titlecaseForce titlecase for all entries. Thetitlecasepackage is used to fix casing of titles which are not titlecased. (Note that the capitalizaton rules used by the package may be a bit different.)-s--sort-byMultiple sort conditions compatible withbibtexparser.BibTexWriterapplied in the provided order. Example:-s ENTRYTYPE yearsorts the list by the entry type as its primary key and year as its secondary key.IDcan be used to refer to the Bibtex key. The default None value keeps the original order of Bib entries.--no-publisherSuppress publishers in conference papers and journals (still kept for books).--process-conf-locParse conference dates and locations, remove from proceedings names, store locations under address.--no-formattingDisable automatic BibTeX formatting.NotesAlthoughreffixuses a conservative approach, it provides no guarantees that the output references are actually correct.If you want to make sure thatreffixdoes not introduce any unwanted changes, please use the interactive mode (flag-i).The tool depends onDBLP APIwhich may change any time in the future. I will try to update the script if necessary, but it may still occasionally break. I welcome any pull requests with improvements.Please be considerate regarding the DBLP API and do not generate high traffic for their servers :-)ContactFor any questions or suggestions, send an e-mail tokasner@ufal.mff.cuni.cz.