- Moved PROLA to APS with Paul Dlug's changes
- Pushed EBSCO, APS, MARC
This commit is contained in:
parent
ee57f38e49
commit
e94c041c0d
|
@ -1,15 +1,15 @@
|
||||||
{
|
{
|
||||||
"translatorID":"2c310a37-a4dd-48d2-82c9-bd29c53c1c76",
|
"translatorID":"2c310a37-a4dd-48d2-82c9-bd29c53c1c76",
|
||||||
"translatorType":4,
|
"translatorType":4,
|
||||||
"label":"PROLA","creator":"Eugeniy Mikhailov and Michael Berkowitz",
|
"label":"APS","creator":"Eugeniy Mikhailov and Michael Berkowitz",
|
||||||
"target":"https?://(?:www\\.)?(prola|prl|prb|rmp|pra|prc|prd|pre|prst-ab|prst-per|)\\.aps\\.org[^/]*/(toc|forward|searchabstract|abstract)/",
|
"target":"https?://(?:www\\.)?(prola|prl|pra|prb|prc|prd|pre|prst-ab|prst-per|rmp)\\.aps\\.org[^/]*/(toc|abstract|forward|showrefs|supplemental)/",
|
||||||
"minVersion":"1.0.0b3.r1",
|
"minVersion":"1.0.0b3.r1",
|
||||||
"maxVersion":null,
|
"maxVersion":null,
|
||||||
"priority":100,
|
"priority":100,
|
||||||
"inRepository":true,
|
"inRepository":true,
|
||||||
"lastUpdated":"2010-01-23 23:15:00"
|
"lastUpdated":"2010-02-04 02:10:00"
|
||||||
}
|
}
|
||||||
// Works for most journals at http://prola.aps.org/browse.html
|
// Works for all APS journals: http://publish.aps.org/
|
||||||
|
|
||||||
function detectWeb(doc, url) {
|
function detectWeb(doc, url) {
|
||||||
// toc indicates table of contents, forward is a "Citing articles" page
|
// toc indicates table of contents, forward is a "Citing articles" page
|
||||||
|
@ -23,7 +23,7 @@ function detectWeb(doc, url) {
|
||||||
function doWeb(doc, url) {
|
function doWeb(doc, url) {
|
||||||
var arts = new Array();
|
var arts = new Array();
|
||||||
if (detectWeb(doc, url) == "multiple") {
|
if (detectWeb(doc, url) == "multiple") {
|
||||||
var items = Zotero.Utilities.getItemArray(doc, doc, "(abstract|abstractsearch)");
|
var items = Zotero.Utilities.getItemArray(doc, doc, "abstract");
|
||||||
items = Zotero.selectItems(items);
|
items = Zotero.selectItems(items);
|
||||||
for (var i in items) {
|
for (var i in items) {
|
||||||
arts.push(i);
|
arts.push(i);
|
||||||
|
@ -37,12 +37,10 @@ function doWeb(doc, url) {
|
||||||
// Use abstract only if we have one
|
// Use abstract only if we have one
|
||||||
if (newDoc.evaluate('//div[contains(@class, "aps-abstractbox")]/p', newDoc, null, XPathResult.ANY_TYPE, null).iterateNext()) var abs = Zotero.Utilities.trimInternal(newDoc.evaluate('//div[contains(@class, "aps-abstractbox")]/p', newDoc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent);
|
if (newDoc.evaluate('//div[contains(@class, "aps-abstractbox")]/p', newDoc, null, XPathResult.ANY_TYPE, null).iterateNext()) var abs = Zotero.Utilities.trimInternal(newDoc.evaluate('//div[contains(@class, "aps-abstractbox")]/p', newDoc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent);
|
||||||
var urlRIS = newDoc.location.href;
|
var urlRIS = newDoc.location.href;
|
||||||
// so far several more or less identical url possible
|
urlRIS = urlRIS.replace(/(abstract|forward|showrefs|supplemental)/,"export");
|
||||||
// one is with "abstract" other with "searchabstract"
|
|
||||||
urlRIS = urlRIS.replace(/(searchabstract|abstract)/,"export");
|
|
||||||
var post = "type=ris";
|
var post = "type=ris";
|
||||||
var snapurl = newDoc.location.href;
|
var snapurl = newDoc.location.href;
|
||||||
var pdfurl = snapurl.replace(/(searchabstract|abstract)/, "pdf");
|
var pdfurl = snapurl.replace(/(abstract|forward|showrefs|supplemental)/, "pdf");
|
||||||
Zotero.Utilities.HTTP.doPost(urlRIS, post, function(text) {
|
Zotero.Utilities.HTTP.doPost(urlRIS, post, function(text) {
|
||||||
// load translator for RIS
|
// load translator for RIS
|
||||||
var translator = Zotero.loadTranslator("import");
|
var translator = Zotero.loadTranslator("import");
|
||||||
|
@ -53,14 +51,14 @@ function doWeb(doc, url) {
|
||||||
item.DOI = item.itemID;
|
item.DOI = item.itemID;
|
||||||
}
|
}
|
||||||
item.attachments = [
|
item.attachments = [
|
||||||
{url:snapurl, title:"PROLA Snapshot", mimeType:"text/html"},
|
{url:snapurl, title:"APS Snapshot", mimeType:"text/html"},
|
||||||
{url:pdfurl, title:"PROLA Full Text PDF", mimeType:"application/pdf"}
|
{url:pdfurl, title:"APS Full Text PDF", mimeType:"application/pdf"}
|
||||||
];
|
];
|
||||||
if (abs) item.abstractNote = abs;
|
if (abs) item.abstractNote = abs;
|
||||||
item.complete();
|
item.complete();
|
||||||
});
|
});
|
||||||
translator.translate();
|
translator.translate();
|
||||||
}, null, 'latin1');
|
}, null, 'UTF-8');
|
||||||
}, function() {Zotero.done();});
|
}, function() {Zotero.done();});
|
||||||
Zotero.wait();
|
Zotero.wait();
|
||||||
}
|
}
|
|
@ -8,7 +8,7 @@
|
||||||
"maxVersion":"",
|
"maxVersion":"",
|
||||||
"priority":100,
|
"priority":100,
|
||||||
"inRepository":true,
|
"inRepository":true,
|
||||||
"lastUpdated":"2010-01-30 00:00:00"
|
"lastUpdated":"2010-02-04 02:00:00"
|
||||||
}
|
}
|
||||||
|
|
||||||
function detectWeb(doc, url) {
|
function detectWeb(doc, url) {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"maxVersion":"",
|
"maxVersion":"",
|
||||||
"priority":100,
|
"priority":100,
|
||||||
"inRepository":true,
|
"inRepository":true,
|
||||||
"lastUpdated":"2010-01-27 11:50:00"
|
"lastUpdated":"2010-02-04 02:00:00"
|
||||||
}
|
}
|
||||||
|
|
||||||
function detectImport() {
|
function detectImport() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user