The binary bundle of citeproc-java contains a command line tool which you can use to execute the library without setting up a full development environment. The tool allows you to create citations and bibliographies in an easy and fast manner. In particular, it comes in very handy if you are in the following situations:
The citeproc-java tool’s general usage is as follows:
citeproc-java [OPTION]... [COMMAND]
The tool accepts the following command line options:
-o, --output <FILE>
-h, --help
-V, --version
The next sections describe the commands you can use and their options.
citeproc-java bibliography [OPTION]... [CITATION ID]...
Generate a bibliography from an input file.
-i, --input <FILE>
*.bib
), EndNote files
(*.enl
), RIS files (*.ris
), and CSL citations in JSON format (*.json
).-s, --style <STYLE>
ieee
, apa
, or chicago-author-date
), or a string containing
an XML-serialized representation of a CSL style. The default value
for this argument is ieee
.-f, --format <FORMAT>
text
(default), html
,
asciidoc
, fo
, and rtf
.-l, --locale <LOCALE>
en-US
.-h, --help
CITATION ID
Generate a bibliography from all items in the given
BibTeX file using the ieee
style
and the en-US
locale:
citeproc-java bibliography -i references.bib
Generate a bibliography that only contains items with the citation
IDs Fowler_2010
and Kisker_2012
:
citeproc-java bibliography -i references.bib Fowler_2010 Kisker_2012
Generate a German bibliography using the din-1505-2
style:
citeproc-java bibliography -i references.bib -s din-1505-2 -l de-DE
citeproc-java citation [OPTION]... [CITATION ID]...
Generate citations from an input file.
-i, --input <FILE>
*.bib
), EndNote files
(*.enl
), RIS files (*.ris
), and CSL citations in JSON format (*.json
).-s, --style <STYLE>
ieee
, apa
, or chicago-author-date
), or a string containing
an XML-serialized representation of a CSL style. The default value
for this argument is ieee
.-f, --format <FORMAT>
text
(default), html
,
asciidoc
, fo
, and rtf
.-l, --locale <LOCALE>
en-US
.-h, --help
CITATION ID
Generate ieee
citations that can be inserted into the text:
citeproc-java citation -i references.bib Fowler_2010 Kisker_2012
The tool will help you if you specify an incorrect citation ID. The following command
citeproc-java citation -i references.bib Fwler_2010 Kisker_2012
will output
citeproc-java: unknown citation id: Fwler_2010
Did you mean this?
Fowler_2010
citeproc-java list [OPTION]...
Display sorted list of available citation IDs.
-i, --input <FILE>
*.bib
), EndNote files
(*.enl
), RIS files (*.ris
), and CSL citations in JSON format (*.json
).-h, --help
citeproc-java json [OPTION]... [CITATION ID]...
Convert input bibliography to JSON. The resulting JSON object can be used as input to other CSL processors such as citeproc-js.
-i, --input <FILE>
*.bib
), EndNote files
(*.enl
), RIS files (*.ris
), and CSL citations in JSON format (*.json
).-h, --help
CITATION ID
citeproc-java mendeley [OPTION]... [COMMAND]
Connect to Mendeley Web and generate styled citations and bibliographies.
When connecting for the first time the tool will synchronize its internal database (stored in the user’s home directory) with the server. The tool will ask for authorization if it has not connected to the Mendeley server before. Authorization can be granted by pointing the web browser to the URL given by the tool, accepting the requesting, and then entering the displayed validation code.
-s, --sync
-h, --help
The mendeley
command accepts a number of subcommands. Most of them have
top-level counter-parts to which they work quite similar except for the fact
that they don’t read from an input file but from Mendeley Web.
bibliography
citation
list
json
sync
Generate a bibliography from all documents stored in Mendeley Web:
citeproc-java mendeley bibliography
Generate a bibliography from Mendeley Web but only include items with
the citation IDs Fowler_2010
and Kisker_2012
:
citeproc-java mendeley bibliography Fowler_2010 Kisker_2012
Generate a bibliography from all documents stored in Mendeley Web but synchronize with the server first:
citeproc-java mendeley -s bibliography
citeproc-java zotero [OPTION]... [COMMAND]
Connect to Zotero and generate styled citations and bibliographies.
When connecting for the first time the tool will synchronize its internal database (stored in the user’s home directory) with the server. The tool will ask for authorization if it has not connected to the Zotero server before. Authorization can be granted by pointing the web browser to the URL given by the tool, accepting the requesting, and then entering the displayed validation code.
-s, --sync
-h, --help
The zotero
command accepts a number of subcommands. Most of them have
top-level counter-parts to which they work quite similar except for the fact
that they don’t read from an input file but from Zotero.
bibliography
citation
list
json
sync
Generate a bibliography from all documents stored in Zotero:
citeproc-java zotero bibliography
Generate a bibliography from Zotero but only include items with
the citation IDs Fowler_2010
and Kisker_2012
:
citeproc-java zotero bibliography Fowler_2010 Kisker_2012
Generate a bibliography from all documents stored in Zotero but synchronize with the server first:
citeproc-java zotero -s bibliography
citeproc-java shell
Run citeproc-java in interactive mode.
In the interactive shell you can open input bibliographies and apply commands
quite similar to the ones described above. The shell also keeps a history of
last used commands. Use the arrow up
and down
keys to scroll through it.
It also supports auto-completion via the tab
key.
The following commands are specified:
load <FILE>
*.bib
), EndNote files
(*.enl
), RIS files (*.ris
), and CSL citations in JSON format (*.json
).bibliography [CITATION ID]...
citation [CITATION ID]...
list
json [CITATION ID]...
mendeley [COMMAND]
zotero [COMMAND]
help [COMMAND]
exit
or quit
citeproc-java help [COMMAND]...
Display help about citeproc-java or about a specific command.