Socket
Socket
Sign inDemoInstall

cffconvert

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cffconvert

Command line program to validate and convert CITATION.cff files.


Maintainers
1

cffconvert

Zenodo DOI testing linting Code Smells PyPI Badge CII Best Practices Research Software Directory fair-software.eu

Command line program to validate and convert CITATION.cff files.

Supported input versions of the Citation File Format:

Citation File Format schema versionLink to Zenodo release
1.2.0Zenodo DOI
1.1.0Zenodo DOI
1.0.3Zenodo DOI
1.0.2Zenodo DOI
1.0.1Zenodo DOI

Supported output formats:

  1. APA-like plaintext
  2. BibTeX
  3. CodeMeta
  4. EndNote
  5. RIS
  6. schema.org JSON
  7. 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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc