Skip to content

Commit 037ffc6

Browse files
committed
Update the README.
A quick start example, licence information, etc.
1 parent 8d35dff commit 037ffc6

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,37 @@ A Ruby library for manipulating CITATION.cff files.
66
[![Build Status](https://travis-ci.org/hainesr/ruby-cff.svg?branch=master)](https://travis-ci.org/hainesr/ruby-cff)
77
[![Maintainability](https://api.codeclimate.com/v1/badges/7eaa3890f17664e10bc6/maintainability)](https://codeclimate.com/github/hainesr/ruby-cff/maintainability)
88
[![Coverage Status](https://coveralls.io/repos/github/hainesr/ruby-cff/badge.svg)](https://coveralls.io/github/hainesr/ruby-cff)
9+
10+
### Synopsis
11+
12+
This library provides a Ruby interface to manipulate CITATION.cff files. The primary entry points are the Model and File classes.
13+
14+
See the [CITATION.cff documentation](https://citation-file-format.github.io/) for more details.
15+
16+
### Quick start
17+
18+
```ruby
19+
cff = CFF::Model.new("Ruby CFF Library")
20+
cff.version = 0.1.0
21+
cff.date_released = Date.today
22+
cff.authors << CFF::Person.new("Robert", "Haines")
23+
24+
CFF::File.write("CITATION.cff", cff)
25+
```
26+
27+
Will produce a file that looks something like this:
28+
29+
```
30+
cff-version: 1.0.3
31+
message: If you use this software in your work, please cite it using the following metadata
32+
title: Ruby CFF Library
33+
version: 0.1.0
34+
date-released: 2018-02-18
35+
authors:
36+
- family-names: Haines
37+
given-names: Robert
38+
```
39+
40+
### Licence
41+
42+
[Apache 2.0](http://www.apache.org/licenses/). See LICENCE for details.

0 commit comments

Comments
 (0)