Fix and push ProQuest
Also changed it to not save URL to URL field and to put abstract into abstract rather than note
This commit is contained in:
parent
e033665b6b
commit
123e2d552d
|
@ -1 +1 @@
|
||||||
2009-07-23 10:00:00
|
2009-07-24 07:55:00
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"maxVersion":"",
|
"maxVersion":"",
|
||||||
"priority":100,
|
"priority":100,
|
||||||
"inRepository":true,
|
"inRepository":true,
|
||||||
"lastUpdated":"2008-05-15 18:30:00"
|
"lastUpdated":"2009-07-24 07:55:00"
|
||||||
}
|
}
|
||||||
|
|
||||||
function detectWeb(doc, url) {
|
function detectWeb(doc, url) {
|
||||||
|
@ -34,19 +34,19 @@ function detectWeb(doc, url) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(doc.title == "Results") {
|
if(doc.title.match("Results")) {
|
||||||
return "multiple";
|
return "multiple";
|
||||||
} else if(doc.title == "Document View") {
|
} else if(doc.title.match("Document View")) {
|
||||||
switch (source) {
|
switch (source) {
|
||||||
case 'Dissertation':
|
case 'Dissertation':
|
||||||
return "thesis";
|
return "thesis";
|
||||||
break;
|
|
||||||
case 'Historical Newspaper':
|
case 'Historical Newspaper':
|
||||||
case 'Newspaper':
|
case 'Newspaper':
|
||||||
return "newspaperArticle";
|
return "newspaperArticle";
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return "journalArticle";
|
return "journalArticle";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -61,8 +61,13 @@ function parseRIS(uris) {
|
||||||
if(url.match("exportFormat=1")=="exportFormat=1") {
|
if(url.match("exportFormat=1")=="exportFormat=1") {
|
||||||
var translator = Zotero.loadTranslator("import");
|
var translator = Zotero.loadTranslator("import");
|
||||||
translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
|
translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
|
||||||
|
|
||||||
|
// Put AB note in abstract field
|
||||||
|
text = text.replace(/^AB \-/gm, 'N2 -');
|
||||||
|
|
||||||
// Strip lines with just whitespace, which mess up RIS parsing
|
// Strip lines with just whitespace, which mess up RIS parsing
|
||||||
text = text.replace(/^\s*$\n/gm, '');
|
text = text.replace(/^\s*$\n/gm, '');
|
||||||
|
|
||||||
translator.setString(text);
|
translator.setString(text);
|
||||||
|
|
||||||
//Set Handler fixes anomaly in Proquest RIS format. Properly formats author name as [last name], [first name]
|
//Set Handler fixes anomaly in Proquest RIS format. Properly formats author name as [last name], [first name]
|
||||||
|
@ -79,6 +84,10 @@ function parseRIS(uris) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.publicationTitle) item.publicationTitle = Zotero.Utilities.trimInternal(item.publicationTitle.replace(/\([\d\-]+\)/g, ""));
|
if (item.publicationTitle) item.publicationTitle = Zotero.Utilities.trimInternal(item.publicationTitle.replace(/\([\d\-]+\)/g, ""));
|
||||||
|
|
||||||
|
// Don't save database page as URL
|
||||||
|
item.url = undefined;
|
||||||
|
|
||||||
item.complete();
|
item.complete();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -104,7 +113,7 @@ function doWeb(doc, url) {
|
||||||
|
|
||||||
if(doc.evaluate('//img[substring(@src, string-length(@src)-32) = "/images/common/logo_proquest.gif" or substring(@src, string-length(@src)-38) = "/images/common/logo_proquest_small.gif"]',
|
if(doc.evaluate('//img[substring(@src, string-length(@src)-32) = "/images/common/logo_proquest.gif" or substring(@src, string-length(@src)-38) = "/images/common/logo_proquest_small.gif"]',
|
||||||
doc, nsResolver, XPathResult.ANY_TYPE, null)) {
|
doc, nsResolver, XPathResult.ANY_TYPE, null)) {
|
||||||
if(doc.title == "Results") {
|
if(doc.title.match("Results")) {
|
||||||
|
|
||||||
//Get Client ID
|
//Get Client ID
|
||||||
var xpath = '//a';
|
var xpath = '//a';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user