The Citation File Format lets you provide citation metadata for software or datasets in plaintext files that are easy to read by both humans and machines.
You can specify citation metadata for your software (or dataset) in a file named CITATION.cff
.
This is what a typical CITATION.cff
file may look like for research software:
cff-version: 1.2.0
message: If you use this software, please cite it using these metadata.
title: My Research Software
abstract: This is my awesome research software. It does many things.
authors:
- family-names: Druskat
given-names: Stephan
orcid: "https://orcid.org/0000-0003-4925-7248"
version: 0.11.2
date-released: "2021-07-18"
identifiers:
- description: This is the collection of archived snapshots of all versions of My Research Software
type: doi
value: "10.5281/zenodo.123456"
- description: This is the archived snapshot of version 0.11.2 of My Research Software
type: doi
value: "10.5281/zenodo.123457"
license: Apache-2.0
repository-code: "https://github.com/citation-file-format/my-research-software"
In addition, the Citation File Format allows you to
You can find the complete format specifications in the Guide to the Citation File Format schema.
CITATION.cff
file to my repository? :bulb:When you do this, great things may happen:
CITATION.cff
!CITATION.cff
file.You can validate your CITATION.cff
file with the Python script
that we also use for testing the Citation File Format schema itself, like so:
# clone this repository
git clone https://github.com/citation-file-format/citation-file-format.git
# change into the cloned repository directory
cd citation-file-format
# install the validation dependencies in user space
python3 -m pip install --user ruamel.yaml jsonschema
# run the validator on your CITATION.cff
python3 examples/validator.py -s schema.json -d path/to/your/CITATION.cff
If you get no output, then congratulations, your CITATION.cff
file is valid.
If you get a Traceback with error messages, look for the relevant validation error and fix it.
If the output is very long, it may help if you search it for lines starting with jsonschema.exceptions.ValidationError
.
<!-- Later, this should link to tutorials -->
CITATION.cff
files :wrench:There is tooling available to work with CITATION.cff
files to do different things:
create new files, edit existing files, validate existing files, convert files from the Citation File Format into another format.
The following table gives an overview of the tools that we know about. If there is a tool missing from this table, please open a new issue and let us know.
| | Creation | Editing/Updating | Validation | Conversion | | -------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Command line | | | • cffconvert<br>• validator.py | • cffconvert | | GitHub Actions | | | | • cffconvert<br>• codemeta2cff | | GitHub Bot | | | #238 | | | Go | | | | • datatools/codemeta2cff | | Java | • CFF Maven plugin | • CFF Maven plugin | | • CFF Maven plugin | | JavaScript | | | | • Citation.js plugin | | Python | | • doi2cff | • cffconvert<br>• validator.py | • cffconvert<br>• doi2cff | | R | | | | • citation<br>• r2cff<br>• handlr | | Ruby | • ruby-cff | • ruby-cff | • ruby-cff | • ruby-cff | | TypeScript | | | | #28 | | Website | • cffinit | | | |
The Citation File Format schema is maintained by
The Citation File Format is a collaborative project and we welcome suggestions and contributions. We hope one of the invitations below works for you, but if not, please let us know!
:running: I'm busy, I only have 1 minute
:hourglass_flowing_sand: I've got 10 minutes - tell me what I should do
CITATION.cff
file for your repository.CITATION.cff
files, help someone with a validation problem and look at the issues labeled :computer: I've got a few hours to work on this
:tada: I want to help grow the community
Please read the more detailed contributing guidelines and open a GitHub issue to suggest a new idea or let us know about bugs.
Copyright © 2016ff. The Citation File Format Contributors
This work is licensed under a Creative Commons Attribution 4.0 International (CC-BY-4.0) license.
We'd like to thank everyone who has contributed to the Citation File Format!
They are listed in the CITATION.cff
file for this repository. Please open an issue if you find that you are missing from the file.
We gratefully acknowledge support from:
Please note that this repository is participating in a study into sustainability of open source projects. Data will be gathered about this repository for approximately the next 12 months, starting from June 2021.
Data collected will include number of contributors, number of PRs, time taken to close/merge these PRs, and issues closed.
For more information, please visit our informational page or download the participant information sheet.