- Notifications
You must be signed in to change notification settings - Fork33
Command line program to validate and convert CITATION.cff files.
License
citation-file-format/cffconvert
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Command line program to validate and convertCITATION.cff files.
| Citation File Format schema version | Link to Zenodo release |
|---|---|
1.3.0 | unreleased |
1.2.0 | |
1.1.0 | |
1.0.3 | |
1.0.2 | |
1.0.1 |
- APA-like plaintext
- BibTeX
- CodeMeta
- EndNote
- RIS
- schema.org JSON
- Zenodo JSON
cffconvert does not support converting items fromreferences orpreferred-citation keys at the moment.
To install in user space,
python3 -m pip install --user cffconvert
Ensure that the user space directory~/.local/bin/ is on thePATH.
which cffconvert
should now return the location of the program.
Seedocs/alternative-install-options.md for alternative install options.
cffconvert is available from DockerHub:https://hub.docker.com/r/citationcff/cffconvert
Example usage:
docker run --rm -v$PWD:/app citationcff/cffconvert --validatedocker run --rm -v$PWD:/app citationcff/cffconvert --versiondocker run --rm -v$PWD:/app citationcff/cffconvert --help# etc
cffconvert is also available as apre-commit hook. Add the following to your.pre-commit-config.yaml file to start validating your CITATION.cff automatically whenever you issue agit commit:
repos: -repo:https://github.com/citation-file-format/cffconvertrev:054bda51dbe278b3e86f27c890e3f3ac877d616chooks: -id:validate-cff
Seecffconvert's options:
cffconvert --help
Shows:
Usage: cffconvert [OPTIONS] Command line program to validate and convert CITATION.cff files.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 Showhelp and exit. --show-trace Show error trace. --validate Validate the CITATION.cff file and exit. --version Print version and exit. --verbose Control output verbosity. If this program is useful to you, consider giving it a star on GitHub: https://github.com/citation-file-format/cffconvert
cffconvert --validatecffconvert --validate -i CITATION.cffcffconvert --validate -i${PWD}/CITATION.cffcffconvert --validate -i ../some-other-dir/CITATION.cffcffconvert --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>
If there is a validCITATION.cff file in the current directory, you can convert to various other formats andprint the result on standard out with:
cffconvert -f bibtexcffconvert -f codemetacffconvert -f endnotecffconvert -f riscffconvert -f schema.orgcffconvert -f zenodocffconvert -f apalike
# with i/o redirection:cffconvert -f bibtex> bibtex.bibcffconvert -f zenodo> .zenodo.jsoncffconvert -f endnote>${PWD}/endnote.enw# etc# without i/o redirectioncffconvert -f bibtex -o bibtex.bibcffconvert -f zenodo -o .zenodo.jsoncffconvert -f endnote -o${PWD}/endnote.enw# etc
About
Command line program to validate and convert CITATION.cff files.
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors15
Uh oh!
There was an error while loading.Please reload this page.