Zenodo.org will be unavailable for 2 hours on September 29th from 06:00-08:00 UTC. See announcement.
There is a newer version of this record available.

Software Open Access

citation-file-format/ruby-cff: Ruby CFF Library

Robert Haines

Ruby CFF Robert Haines

A Ruby library for manipulating CITATION.cff files.

Synopsis

This library provides a Ruby interface to manipulate CITATION.cff files. The primary entry points are the Model and File classes.

See the CITATION.cff documentation for more details.

Quick start
cff = CFF::Model.new("Ruby CFF Library")
cff.version = CFF::VERSION
cff.date_released = Date.today
cff.authors << CFF::Person.new("Robert", "Haines")
cff.license = "Apache-2.0"
cff.keywords << "ruby" << "credit" << "citation"
cff.repository_artifact = "https://rubygems.org/gems/cff"

CFF::File.write("CITATION.cff", cff)

Will produce a file that looks something like this:

cff-version: 1.0.3
message: If you use this software in your work, please cite it using the following metadata
title: Ruby CFF Library
version: 0.3.0
date-released: 2018-03-04
license: Apache-2.0
repository-artifact: https://rubygems.org/gems/cff
authors:
- family-names: Haines
  given-names: Robert
keywords:
- ruby
- credit
- citation
Library versions

Until this library reaches version 1.0.0 the API may be subject to breaking changes. When version 1.0.0 is released, then the principles of semantic versioning will be applied.

Licence

Apache 2.0. See LICENCE for details.

Files (42.2 kB)
Name Size
citation-file-format/ruby-cff-v0.4.0.zip
md5:851a0dbd151145fe79241d002a8be367
42.2 kB Download
4,048
173
views
downloads
All versions This version
Views 4,048311
Downloads 17325
Data volume 16.1 MB1.1 MB
Unique views 2,781213
Unique downloads 11322

Share

Cite as