0.0
No commit activity in last 3 years
No release in over 3 years
Leverages a Maven and a custom JAR and wraps it with JRuby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.2
~> 1.2
~> 1.7
~> 10.0
~> 0.7
~> 2.5
 Project Readme

citero-jruby

Build Status Build Status Dependency Status Code Climate Gem Version Coverage Status

A JRuby wrapper for the Citero, enables use of the Citero in JRuby. See Citero.

Usage Details

To use Citero simply pass in your data into the Citero module via the map method. Then call the method that specifies the from format and the method that specifies what format you want to translate to.

Citero.map("itemType: book").from\_csf.to_ris		# Returns a string with the value TY  - BOOK\n\nER  -\n\n

You can find available formats via:

Citero.from_formats		# List of from formats (Array)
						# pnx, xerxes_xml, ris, openurl, bibtex, csf*
Citero.to_formats		# List of to formats (Array)
						# ris, openurl, bibtex, easybib, csf*

*CSF is Citero Standard Form, it's an internal mapping DSL.

To call a method, simply append the format name after either from_ or to_. Note, you must call from_ before to_ and map before anything else.

csf = Citero.map("itemType: book").from_csf
csf.to_ris			# ->	TY  - BOOK\n\nER  -\n\n
csf.to_openurl		# ->	rft.ulr_ver=Z39.88-2004&rft.ctx_ver=Z39.88-2004&rft.rfr_id=info:sid/libraries.nyu.edu:citero&rft_val_fmlt=info:ofi/fmt:kev:mtx:book&rft.genre=book
csf.to_easybib		# ->	{"source":"book","book":{"title":null},"pubtype":{"main":"pubnonperiodical"},"pubnonperiodical":{},"contributors":[{}]}
csf.to_bibtex		# ->	@book{????}

Finally, this gem allows you to interact with the CSF object, you can call the csf method.

rec = Citero.map("itemType: book").from_csf
csf = rec.csf
p csf.itemType # => Prints ['book']
p csf.keys # => Prints ['itemType']