cffconvert
Command line program to validate and convert CITATION.cff files.
Supported input versions of the Citation File Format:
| Citation File Format schema version | Link to Zenodo release |
|---|---|
1.2.0 |
|
1.1.0 |
|
1.0.3 |
|
1.0.2 |
|
1.0.1 |
Supported output formats:
- APA-like plaintext
- BibTeX
- CodeMeta
- EndNote
- RIS
- schema.org JSON
- Zenodo JSON
cffconvert does not support converting items from references or preferred-citation keys at the moment.
Installing
To install in user space,
python3 -m pip install --user cffconvert
Ensure that the user space directory ~/.local/bin/ is on the PATH.
which cffconvert
should now return the location of the program.
See docs/alternative-install-options.md for alternative install options.
Command line interface
See cffconvert's options:
cffconvert --help
Shows:
Usage: cffconvert [OPTIONS]
Options:
-i, --infile PATH Path to the CITATION.cff input file. If this
option is omitted, './CITATION.cff' is used.
-o, --outfile PATH Path to the output file.
-f, --format [apalike|bibtex|cff|codemeta|endnote|ris|schema.org|zenodo]
Output format.
-u, --url TEXT URL to the CITATION.cff input file.
-h, --help Show help and exit.
--show-trace Show error trace.
--validate Validate the CITATION.cff file and exit.
--version Print version and exit.
Example usage
Validating a local CITATION.cff file
cffconvert --validate
cffconvert --validate -i CITATION.cff
cffconvert --validate -i ${PWD}/CITATION.cff
cffconvert --validate -i ../some-other-dir/CITATION.cff
Validating a remote CITATION.cff file
cffconvert --validate --url https://github.com/<org>/<repo>
cffconvert --validate --url https://github.com/<org>/<repo>/commit/<sha>
cffconvert --validate --url https://github.com/<org>/<repo>/tree/<sha>
cffconvert --validate --url https://github.com/<org>/<repo>/tree/<tag>
cffconvert --validate --url https://github.com/<org>/<repo>/tree/<branch>
Converting metadata to other formats
If there is a valid CITATION.cff file in the current directory, you can convert to various other formats and
print the result on standard out with:
cffconvert -f bibtex
cffconvert -f codemeta
cffconvert -f endnote
cffconvert -f ris
cffconvert -f schema.org
cffconvert -f zenodo
cffconvert -f apalike
Writing to a file
# with i/o redirection:
cffconvert -f bibtex > bibtex.bib
cffconvert -f zenodo > zenodo.json
cffconvert -f endnote > ${PWD}/endnote.enw
# etc
# without i/o redirection
cffconvert -f bibtex -o bibtex.bib
cffconvert -f zenodo -o zenodo.json
cffconvert -f endnote -o ${PWD}/endnote.enw
# etc
Metadata
Release files for cffconvert 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cffconvert-2.0.0.tar.gz | 147.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cffconvert-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 331.2 kB
Release files / cffconvert-2.0.0.tar.gz
| Download URL | cffconvert-2.0.0.tar.gz |
|---|---|
| Size | 147.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4379ee415c6637dc9e3e7ba196605cb3cedcea24613e4ea242c607d9e98eb50
|
|
BLAKE2b-256 checksum How to use checksums |
ac7ecd1018d4073e83b852c478bab20a0855944c0122e9bf843fd17abcfd9ac7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.9
|
Release files / cffconvert-2.0.0-py3-none-any.whl
| Download URL | cffconvert-2.0.0-py3-none-any.whl |
|---|---|
| Size | 183.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
573c825e4e16173d99396dc956bd22ff5d4f84215cc16b6ab05299124f5373bb
|
|
BLAKE2b-256 checksum How to use checksums |
42ae28c3d933b4343f61cc5d63748b53746e5d73b1f66c88e7a93477f22b8909
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.9
|