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 details)
Built Distribution
File details
Details for the file yaml2bib-0.1.3.tar.gz
.
File metadata
- Download URL: yaml2bib-0.1.3.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200325 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2997d4ebaf1013eb829ef4bcd07dd20c160882463cb140ad15c80fa93d1ea8aa |
|
MD5 | 746491bbf6b92c219dd94cef4e57b7be |
|
BLAKE2b-256 | bbf5ecb287bd24c9d54a5f0db654262262293b18321e1711ec7eb30701e9e1a4 |
File details
Details for the file yaml2bib-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: yaml2bib-0.1.3-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200325 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85655e2a8d533a481c37bb471b2467ac44521bec81045397ba36acc13c993cf4 |
|
MD5 | e153fac868f7b1109023e76d8b950916 |
|
BLAKE2b-256 | 0245a05baaf310cb56c5265b903485d895a1fc911a83c4532f42b81ea177ae18 |