Skip to content

Instantly share code, notes, and snippets.

@jsta
Last active May 3, 2017 01:36
Show Gist options
  • Save jsta/872d3cef1df8dab6cfb0a766faf992d2 to your computer and use it in GitHub Desktop.
Save jsta/872d3cef1df8dab6cfb0a766faf992d2 to your computer and use it in GitHub Desktop.
KNB Zotero web translator
{
"translatorID": "7a81d945-7d9c-4f8c-bd7b-4226c1cadasd",
"label": "KNB",
"creator": "Joseph Stachelek",
"target": "https://knb.ecoinformatics.org/",
"minVersion": "3.0",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2017-05-03 01:35:00"
}
/*
***** BEGIN LICENSE BLOCK *****
This file is part of Zotero.
Zotero is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Zotero is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
***** END LICENSE BLOCK *****
*/
function detectWeb(doc, url) {
return "Dataset";
}
function doWeb(doc, url) {
scrape(doc, url);
}
function scrape(doc, url){
var doi_key = /Biocomplexity/;
var citation = ZU.xpathText(doc, '//*[contains(concat( " ", @class, " " ), concat( " ", "citation", " " ))]');
Zotero.debug(citation);
var jsta = doi_key.exec(citation);
Zotero.debug(jsta);
// var new_item = new Zotero.Item("Dataset");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment