Skip to content

Instantly share code, notes, and snippets.

@retorquere
Created January 18, 2020 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save retorquere/457380e6c7df16268dc9ba68953a6541 to your computer and use it in GitHub Desktop.
Save retorquere/457380e6c7df16268dc9ba68953a6541 to your computer and use it in GitHub Desktop.
{
"translatorID": "4760d5ea-7bbf-4fce-a29c-f88e508eecd7",
"label": "Bare Export",
"description": "Dumps Zotero export objects to JSON",
"creator": "Emiliano Heyns",
"target": "json",
"minVersion": "4.0.27",
"maxVersion": "",
"configOptions": {
"getCollections": true
},
"displayOptions": {
"exportNotes": true,
"exportFileData": false
},
"translatorType": 2,
"browserSupport": "gcsv",
"priority": 49,
"inRepository": false
}
function doExport() {
const items = [];
let item;
while (item = Zotero.nextItem()) {
items.push(item);
}
const collections = [];
let collection;
while (collection = Zotero.nextCollection()) {
collections.push(collection)
}
Zotero.write(JSON.stringify({ items, collections }, null, 2));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment