Package: regenbib
regenbib(Re-)generate tidy.bibfiles from online sourcesMotivationThe gist ofregenbibis as follows.
Instead of manually maintaining areferences.bibfile with a bunch of entries like this ...@inproceedings{streamlet,author="Chan, Benjamin Y. and Shi, Elaine",title="Streamlet: Textbook Streamlined Blockchains",booktitle="{AFT}",pages="1--11",publisher="{ACM}",year="2020"}... you should maintain areferences.yamlfile with corresponding entries like that:entries:-bibtexid:streamletdblpid:conf/aft/ChanS20The toolregenbibcan then automatically (re-)generate thereferences.bibfrom thereferences.yamlin a consistent way by retrieving high-quality metadata information from the corresponding online source (in the example above:dblp's entryconf/aft/ChanS20).The toolregenbib-importhelps to maintain thereferences.yamlfile. Using LaTeX's.auxfile, it determines entries that are cited but are currently missing from thereferences.yamlfile. It then helps the user determine an appropriate online reference through an interactive lookup right from the command line. In the lookup process, an old (possibly messy)references.bibfile can be used to obtain starting points for the search (eg, title/author in an oldreferences.bibentry can be used to lookup the paper on dblp).See the usage example below for details.InstallationIf your LaTeX project already has a Python virtual environment, activate it.
Otherwise, setup and activate a virtual environment like this:$python-mvenvvenv
$echo"venv/">>.gitignore
$sourcevenv/bin/activateThen installregenbib:$pipinstallgit+https://github.com/joachimneu/regenbib.gitYou should now have the commandsregenbibandregenbib-importavailable to you.Example UsageSuppose we have an oldreferences.bibfile with this entry (and suppose it does not have a corresponding entry in ourreferences.yamlfile):@misc{streamlet,author={Chan and Shi},title={Streamlet Textbook Streamlined Blockchains}}We can easily import a corresponding entry to ourreferences.yamlfile withregenbib-import:$ regenbib-import --bib references.bib --aux _build/main.aux --yaml references.yaml
Importing entry: streamlet
-> Current entry: Entry('misc',
  fields=[
    ('title', 'Streamlet Textbook Streamlined Blockchains')],
  persons=OrderedCaseInsensitiveDict([('author', [Person('Chan'), Person('Shi')])]))
-> Import method? [0=skip, 1=dblp-free-search, 2=arxiv-manual-id, 3=eprint-manual-id, 4=current-entry, 5=dblp-search-title, 6=dblp-search-authorstitle]: 6
-----> The search returned 2 matches:
-----> (1)	Benjamin Y. Chan, Elaine Shi:
		Streamlet: Textbook Streamlined Blockchains. AFT 2020
		https://doi.org/10.1145/3419614.3423256  https://dblp.org/rec/conf/aft/ChanS20
-----> (2)	Benjamin Y. Chan, Elaine Shi:
		Streamlet: Textbook Streamlined Blockchains. IACR Cryptol. ePrint Arch. (2020) 2020
		https://eprint.iacr.org/2020/088  https://dblp.org/rec/journals/iacr/ChanS20
-----> Intended publication? [0=abort]: 1As you see,regenbib-importuses the messy/incomplete information from the oldreferences.bibfile to help us quickly determine the appropriate dblp entry. This adds the following entry toreferences.yaml:entries:-bibtexid:streamletdblpid:conf/aft/ChanS20We can then re-generate a tidyreferences.bibfile based on thereferences.yamlfile:$ regenbib --yaml references.yaml --bib references.bib
DblpEntry(bibtexid='streamlet', dblpid='conf/aft/ChanS20')
Entry('inproceedings',
  fields=[
    ('title', 'Streamlet: Textbook Streamlined Blockchains'),
    ('booktitle', '{AFT}'),
    ('pages', '1--11'),
    ('publisher', '{ACM}'),
    ('year', '2020')],
  persons=OrderedCaseInsensitiveDict([('author', [Person('Chan, Benjamin Y.'), Person('Shi, Elaine')])]))
$ cat references.bib
@inproceedings{streamlet,
    author = "Chan, Benjamin Y. and Shi, Elaine",
    title = "Streamlet: Textbook Streamlined Blockchains",
    booktitle = "{AFT}",
    pages = "1--11",
    publisher = "{ACM}",
    year = "2020"
}Supported Entry Types & Online Metadata SourcesSee entry types inregenbib/store.py:dblparXivIACR ePrintRaw.bibentry