# cffconvert

This page is an online equivalent of the command line tool cffconvert. With this page, you can read a CFF formatted CITATION file from a supplied string or a GitHub url, and convert it to Apalike, BibTeX, EndNote, Codemeta, RIS, schema.org, or Zenodo JSON. The way to do that is by supplying various combinations of arguments as query parameters in the URL (see examples below).

## Version

Display the version of the cffconvert tool, as follows

- ?version

## Converting from a URL

For the examples below, we use the repository https://github.com/citation-file-format/cff-converter-python as the source from which to read the CITATION data. By using the outputformat parameter, we can convert to various other formats, as follows.

- ?url=https://github.com/citation-file-format/cff-converter-python&outputformat=codemeta
- ?url=https://github.com/citation-file-format/cff-converter-python&outputformat=endnote
- ?url=https://github.com/citation-file-format/cff-converter-python&outputformat=schema.org
- ?url=https://github.com/citation-file-format/cff-converter-python&outputformat=ris
- ?url=https://github.com/citation-file-format/cff-converter-python&outputformat=zenodo

Or if you just want to check the CITATION.cff for a certain repository, simply set the outputformat parameter to cff:

- ?url=https://github.com/citation-file-format/cff-converter-python&outputformat=cff

The following GitHub URL formats are supported:

- ?url=https://github.com/citation-file-format/cff-converter-python&outputformat=cff
- ?url=https://github.com/citation-file-format/cff-converter-python/commit/03fd5c1bdbf3cd81e29c8f117526661d61076f28&outputformat=cff
- ?url=https://github.com/citation-file-format/cff-converter-python/tree/master&outputformat=cff
- ?url=https://github.com/citation-file-format/cff-converter-python/tree/1.2.1&outputformat=cff

## Converting from a supplied string

Instead of a GitHub URL, it's also possible to use a string as the data source. For this, you need to make sure that the CFF data (which is in YAML format) has been encoded as a URL string, for example using an online service like https://onlineyamltools.com/url-encode-yaml. The way this works is very similar to using outputformat, except now the data is part of the URL, like so:

- ?cffstr=%23%20YAML%201.2%0A---%0Aauthors%3A%0A%20%20-%0A%20%20%20%20affiliation%3A%20%22Netherlands%20eScience%20Center%22%0A%20%20%20%20family-names%3A%20Spaaks%0A%20%20%20%20given-names%3A%20Jurriaan%20H.%0A%20%20%20%20orcid%3A%20https%3A%2F%2Forcid.org%2F0000-0002-7064-4069%0A%20%20-%0A%20%20%20%20affiliation%3A%20%22Netherlands%20eScience%20Center%22%0A%20%20%20%20family-names%3A%20Klaver%0A%20%20%20%20given-names%3A%20Tom%0A%20%20-%0A%20%20%20%20affiliation%3A%20%22Netherlands%20eScience%20Center%22%0A%20%20%20%20family-names%3A%20Verhoeven%0A%20%20%20%20given-names%3A%20Stefan%0A%20%20%20%20orcid%3A%20https%3A%2F%2Forcid.org%2F0000-0002-5821-2060%0A%20%20-%0A%20%20%20%20affiliation%3A%20%22Humboldt-Universit%C3%A4t%20zu%20Berlin%22%0A%20%20%20%20family-names%3A%20Druskat%0A%20%20%20%20given-names%3A%20Stephan%0A%20%20%20%20orcid%3A%20https%3A%2F%2Forcid.org%2F0000-0003-4925-7248%0Acff-version%3A%20%221.0.3%22%0Adate-released%3A%202019-07-16%0Adoi%3A%2010.5281%2Fzenodo.1162057%0Akeywords%3A%0A%20%20-%20%22citation%22%0A%20%20-%20%22bibliography%22%0A%20%20-%20%22cff%22%0A%20%20-%20%22CITATION.cff%22%0Alicense%3A%20Apache-2.0%0Amessage%3A%20%22If%20you%20use%20this%20software%2C%20please%20cite%20it%20using%20these%20metadata.%22%0Arepository-code%3A%20%22https%3A%2F%2Fgithub.com%2Fcitation-file-format%2Fcff-converter-python%22%0Atitle%3A%20cffconvert%0Aversion%3A%20%221.2.1%22%0A&outputformat=zenodo

## Validating

Validation is also supported. Just include the validate parameter, as follows

- ?url=https://github.com/citation-file-format/cff-converter-python&validate