RCite is a tiny tool that can be used to generate citations and bibliography entries based on parameterized literature descriptions in the spirit of BibTeX, BibLaTeX and CSL.
The existing solutions mentioned above all have one flaw in common: It is utterly cumbersome to create or edit styles. BibTeX style syntax is extremely hard to learn; BibLaTeX suffers from the fact that LaTeX itself is somewhat a hybrid between programming and markup language; and CSL uses XML to create styles in a not very intuitive manner.
RCite attempts to avoid this flaw by making styles pure Ruby. Given its simplicity and human-readability, Ruby is almost ideal for this purpose: Beginners can use builtin methods to chain strings together, while experts can command its full power to create complex styles.
$ gem install rcite
$ git clone git://github.com/JLimperg/rcite.git
$ cd rcite
$ bundle install
The rcite
command provides a (very) basic interface to RCite. It can be
used as follows:
rcite [bib|cite] --style=stylefile --bib=bibfile [--] key
bib
Causes the programme to generate a bibliography entry for the specified
text.
cite
Causes the programme to generate a citation for the specified text.
key
The text's id, which is the unique identifier given in the bibfile.
stylefile
An RCite style. For instructions on how to make a style, see below.
bibfile
A BibTeX file containing bibliographic data about the texts you want
to cite.
In addition to this 'manual' usage, RCite provides a preprocessing mode in which it parses a file and replaces certain commands with citations or bibliography entries. See the Processing Guide.
See the Style Guide.
Please do! I am actually pretty much of a Ruby noob so do not hesitate to fix my mistakes. ;) RCite is at the moment lacking quite a number of major features which can partly be found in the issue tracker on Github.
Please take care, though, that your pull request/patch does not break the spec examples and that it is itself thoroughly spec'ed and documented. I am going for 100% code and documentation coverage, therefore it would be cool if you could do so as well. Bonus points for topic branches.
After having installed RCite (including the development dependencies), run the following command:
bundle exec rake test
Documentation can be generated in ./doc
using
bundle exec rake doc
Please don't use plain RDoc but rather YARD when making modifications, otherwise things will probably look strange.
Please head to the issue tracker on Github.
RCite is licensed under the MIT license, a copy of which can be found in the LICENSE file.