Skip to content

Instantly share code, notes, and snippets.

@OriHoch
Created February 6, 2018 10:58
Show Gist options
  • Save OriHoch/2b8d811c56c3ff34b02310bcc0f1486b to your computer and use it in GitHub Desktop.
Save OriHoch/2b8d811c56c3ff34b02310bcc0f1486b to your computer and use it in GitHub Desktop.
{
"translatorID": "dcf19e16-0b1e-11e8-bed0-e4a4719186ba",
"translatorType": 1,
"label": "Migdar",
"creator": "Ori Hoch",
"target": "migdar",
"minVersion": "3.0",
"maxVersion": "",
"priority": 100,
"inRepository": false,
"browserSupport": "gcsibv",
"lastUpdated": "2018-02-06 11:23:00"
}
function detectImport() {
// return (Zotero.read() === "MIGDAR");
return true;
}
function doImport() {
var item, collection_children = [];
for (var i = 1; i < 10; i++) {
item = new Zotero.Item("webpage");
item.title = ZU.unescapeHTML("Migdar Item "+i);
item.itemID = item.id = "migdar-item-id-"+i;
item.url = "http://migdar/item/"+i;
collection_children.push({"type": "webpage", "id": item.itemID});
item.complete();
}
var collection = new Zotero.Collection();
collection.name = "Migdar Data Items";
collection.type = "collection";
collection.children = collection_children;
collection.complete();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment