Another, better RIS hack until #821 is fixed.
This commit is contained in:
parent
669f115376
commit
8956ca14a9
41
scrapers.sql
41
scrapers.sql
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
-- Set the following timestamp to the most recent scraper update date
|
||||
REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2007-11-25 14:00:00'));
|
||||
REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2007-11-26 23:00:00'));
|
||||
|
||||
REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b4.r1', '', '2007-06-21 20:00:00', '1', '100', '4', 'Amazon.com', 'Sean Takats', '^https?://(?:www\.)?amazon',
|
||||
'function detectWeb(doc, url) {
|
||||
|
@ -14926,7 +14926,7 @@ function doImport() {
|
|||
}
|
||||
}');
|
||||
|
||||
REPLACE INTO translators VALUES ('32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7', '1.0.0b4.r1', '', '2007-11-20 09:35:00', '1', '100', '3', 'RIS', 'Simon Kornblith', 'ris',
|
||||
REPLACE INTO translators VALUES ('32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7', '1.0.0b4.r1', '', '2007-11-26 23:00:00', '1', '100', '3', 'RIS', 'Simon Kornblith', 'ris',
|
||||
'Zotero.configure("dataMode", "line");
|
||||
Zotero.addOption("exportNotes", true);
|
||||
|
||||
|
@ -15138,23 +15138,26 @@ function processTag(item, tag, value) {
|
|||
}
|
||||
} else if(tag == "UR" || tag == "L1" || tag == "L2" || tag == "L4") {
|
||||
// URL
|
||||
if(!item.url) {
|
||||
// commenting out until #821 is fixed
|
||||
// item.url = value;
|
||||
}
|
||||
|
||||
if(tag == "UR") {
|
||||
// commenting out until #821 is fixed
|
||||
// item.attachments.push({url:value});
|
||||
} else if(tag == "L1") {
|
||||
item.attachments.push({url:value, mimeType:"application/pdf",
|
||||
title:"Full Text (PDF)", downloadable:true});
|
||||
} else if(tag == "L2") {
|
||||
item.attachments.push({url:value, mimeType:"text/html",
|
||||
title:"Full Text (HTML)", downloadable:true});
|
||||
} else if(tag == "L4") {
|
||||
item.attachments.push({url:value,
|
||||
title:"Image", downloadable:true});
|
||||
//using regex to test URL until #821 is fixed
|
||||
urlRe = /(https?:\/\/[^\s]*)/;
|
||||
var m = urlRe.exec(value);
|
||||
if (m){
|
||||
value = m[1];
|
||||
if(!item.url) {
|
||||
item.url = value;
|
||||
}
|
||||
if(tag == "UR") {
|
||||
item.attachments.push({url:value});
|
||||
} else if(tag == "L1") {
|
||||
item.attachments.push({url:value, mimeType:"application/pdf",
|
||||
title:"Full Text (PDF)", downloadable:true});
|
||||
} else if(tag == "L2") {
|
||||
item.attachments.push({url:value, mimeType:"text/html",
|
||||
title:"Full Text (HTML)", downloadable:true});
|
||||
} else if(tag == "L4") {
|
||||
item.attachments.push({url:value,
|
||||
title:"Image", downloadable:true});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user