Convert a yaml file containing (key -> DOI) pairs to bib file with the correct journal abbreviations.
Project description
yaml2bib
: Convert a yaml
file to bib
file with the correct journal abbreviations using only DOI
s
Install
pip install yaml2bib
Usage
Use as command line tool
Usage: yaml2bib [OPTIONS]
Options:
--bib_fname TEXT Output file. (default: 'dissertation.bib')
--dois_yaml TEXT The `key: doi` YAML file, may contain wildcards
(*). (default: 'bib.yaml' ,example: '*/*.yaml')
--replacements_yaml TEXT Replacements to perform, might be None. (default:
None, example: 'replacements.yaml')
--static_bib TEXT Static bib entries, might be None, may contain
wildcards (*). (default: None, example:
'chapter_*/not_on_crossref.bib')
--doi2bib_database TEXT The doi2bib database folder 📁 to not query doi.org
more than needed. (default: 'yaml2bib-doi2bib.db')
--crossref_database TEXT The Crossref database folder 📁 to not query
crossref.org more than needed. (default:
'yaml2bib-doi2bib.db')
--email TEXT E-mail 📧 for crossref.org, such that one can make
more API calls without getting blocked. (default:
'anonymous', example: 'bas@nijho.lt')
--help Show this message and exit.
Example invocation for my thesis:
yaml2bib \
--bib_fname "dissertation.bib" \
--dois_yaml "*/*.yaml" \
--replacements_yaml "replacements.yaml" \
--static_bib "chapter_*/not_on_crossref.bib" \
--email "bas@nijho.lt"
or as a library:
from yaml2bib import yaml2bib
yaml2bib(
bib_fname="dissertation.bib",
dois_yaml="*/*.yaml",
replacements_yaml="replacements.yaml",
static_bib="chapter_*/not_on_crossref.bib",
email="bas@nijho.lt",
)
License
MIT License
Contributions
- Bas Nijholt
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yaml2bib-0.1.3.tar.gz
(6.8 kB
view hashes)