ExCite Engine Gem

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

A JRuby wrapper for the citero tool, enables use of the citero tool in JRuby distributed as a Rails 3 Engine Gem.


Mount the engine gem to your rails project like so:

mount ExCite::Engine, :at => '/MOUNT_LOCATION'

You'll need to require the jquery-rails gem also.

In your Gemfile

gem "jquery-rails"

Formats supported

Currently supporting PNX, RIS, CSF, BiBTeX, OpenURL, XERXES_XML, and EasyBib JSON.

Currently supports the following services RefWorks, EasyBib, EndNote.

How to use

There are two methods to use this engine. To use the ActiveRecord method, first you must have a record that implements acts_as_citable.

Otherwise, you can POST or GET to /MOUNT_LOCATION/export_citations(/:to_format)(/:id) with the parameters data[] and from_format[] defined. The data[] array and the from_format[] array must correspond to each other, that is, each element, e, in data[] is of from_format format[e].

Finally, you can send an OpenURL request, simply define the :to_format and pass in the query string.


Some services, such as Endnote, RefWorks, and EasyBib are already included in ex_cite. These services are configurable right out of the box for your needs.

There are two ways to use services, rendering and redirect. The render method will render a view with a 200 response, and the redirect will, as expected, redirect to another page with a 302 response.

To configure a built-in service, such as Endnote, Refworks, or EasyBib, simply modify the following objects


The available options are as follow, with available defaults shown

:name               =>  'Service' # What you want to call this service, and how it will be accessed, i.e. 'easybibpush'
:to_format          =>  # The format that the service is expecting
:action             =>  'render' # Either :redirect or :render is supported
:template           =>  'ex_cite/cite/external_form' # The template view to render. You are free to use your own, ex_cite provides one for free!
:url                =>  # The url to redirect to or the url to send the form to
:method             =>  'POST' # This is the form action
:enctype            =>  'application/x-www-form-urlencoded' # This is the enctype for the form
:element_name       =>  'data' # The default view constructs a form that automatically posts, this is the name of the textbox.
:callback_protocol  =>  :http # The protocol the callback url is to use for this application. Defaults to :http, supports :https

alias :protocol :callback_protocol  # An alias, should you wish to use this outdated version.

To add a new service, simply

easybib = PushFormat.new( :name => :easybibpush, :to_format => :easybib, :action => :render, :template => "ex_cite/cite/external_form", :url => "http://www.easybib.com/cite/bulk")
ExCite.push_formats['easybib'] = easybib


Mounted at root (/)

GET, POST (ActiveRecord, will download RIS)

GET, POST (ActiveRecord, will push to refworks)

GET, POST (Non ActiveRecord, will download RIS)
GET, POST (Non ActiveRecord, will push to refworks)

OpenURL (Non ActiveRecord, will download RIS)
OpenURL (Non AciveRecord, will push to refworks)