A Zotero plugin adding citation metadata support, with back and forth communication to WikiData, citation extraction from file attachments, and local citation network visualization.
Initial development of this plugin was supported by a grant from the Wikimedia Foundation.
The plugin consists of four separate basic modules:
This module adds citation metadata support to Zotero. It provides an additional Citations tab where the user can:
- add, edit or remove individual citations;
- run item-wide and citation specific actions, such as syncing citations with WikiData, parsing citations from attachments (not yet supported), etc;
- edit source item's UUIDs, such as DOI, WikiData's QID, and OpenCitations Corpus ID.
Citations metadata are currently saved as a note attachment.
This module provides back and forth citation syncing with WikiData, using property P2860 "cites work".
This module allows visualizing how items in a local library connect to each other through citations, using Tim Wölfle's Local Citation Network.
This module will send file attachments to local or remote citation extraction services (e.g., Grobid, Scholarcy) and retrieve parsed citations from them.
Download the latest XPI and install it in Zotero.
Quickstart guide available at Wikidata's Cita page.
Cita is collaboratively translated at translatewiki.net. Would you like to help translate it to other languages? Join the translation project here!
- Download a beta version of Zotero from here - these come with the debug tools already enabled so you don't need to build it from source.
- Install nodejs and npm if you don't already have them (Currently Node v18 and npm v8.1 are the minimum required versions)
- Clone the source code
git clone https://github.com/diegodlh/zotero-cita
, and rungit submodule update --init --recursive
to fetch the nested submodules. - Setup the plugin to run with the debug version of Zotero
- Make a new file in the repo root called
.env
(you can also copy an example.env
file from here) - Add a line in
.env
likeZOTERO_PLUGIN_ZOTERO_BIN_PATH = <path-to-your-zotero-binary>
to point to the executable of the Zotero debug build you downloaded in step 1. - Add a line in
.env
pointing to the Zotero profile you will be using:ZOTERO_PLUGIN_PROFILE_PATH = <path-to-your-zotero-profile-folder>
(ideally, create a new Zotero profile for debugging). For me the folder is called3vvlvf75.debug
. Instructions on how to find this folder can be found here
- Make a new file in the repo root called
- Run
npm install
- This plugin is built using esbuild. Run
npm run start
to launch Zotero and rebuild the plugin automatically each time the source code is changed (thanks to zotero-plugin-scaffold). For some changes like CSS the hot reloading doesn't work and you will need to restart Zotero. Built files will be saved tobuild/addon/chrome/content
.- The firefox debug tools should automatically pop up, allowing you to see console output, debug code, and edit CSS. Most code should be visible under
file://
in the debugger
- The firefox debug tools should automatically pop up, allowing you to see console output, debug code, and edit CSS. Most code should be visible under
- For distribution, run
npm run build
, then you can find the extension atbuild/zotero-cita.xpi
.
- Decide a new version number vX.Y.Z using Semantic Versioning, and depending on whether it's a beta release or not.
npm run release
and choose this version number and the version will be automatically bumped inpackage.json
and the release tagged. This will trigger github actions to build the code and make a new release at this version- Until integration tests have been implemented (#30), install the new version on a fresh Zotero profile and run some manual tests.
Cita depends on:
- maxlath's wikibase-edit & wikibase-sdk
- Tim Wölfle's Local Citation Network
- React
Support for importing/exporting citations from/to a file, among other contributions, were mostly implemented by Dominic Dall'Osto.
Copyright (C) 2022 Diego de la Hera, Dominic Dall'Osto, and contributors.
This work is released under the terms of GPL-3.0 or any later version.
Cita for Zotero 7 was based on windingwind's zotero plugin template, while previous versions were based on Will Shanks' Zutilo plugin.
Doing anything new in XUL has also been strongly recommended against, and using standard React/HTML has been suggested instead (see here, or here). For these cases, some inspiration has been borrowed from already reactified components in Zotero's source code.