Closes #927. Web of Science/Knowledge translator now imports abstract.

This commit is contained in:
Michael Berkowitz 2008-02-11 19:58:36 +00:00
parent b6059222cc
commit f7d3ba4c21

View File

@ -22,7 +22,7 @@
-- Set the following timestamp to the most recent scraper update date
REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2008-02-11 19:30:00'));
REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2008-02-11 21: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) {
@ -12686,14 +12686,14 @@ function doWeb(doc, url) {
Zotero.wait();
}');
REPLACE INTO translators VALUES ('594ebe3c-90a0-4830-83bc-9502825a6810', '1.0.0b4.r5', '', '2008-02-06 01:00:00', '0', '100', '4', 'ISI Web of Knowledge', 'Michael Berkowitz', 'http://[^/]*isiknowledge.com[^/]*/',
REPLACE INTO translators VALUES ('594ebe3c-90a0-4830-83bc-9502825a6810', '1.0.0b4.r5', '', '2008-02-11 21:00:00', '1', '100', '4', 'ISI Web of Knowledge', 'Michael Berkowitz', 'http://[^/]*isiknowledge.com[^/]*/',
'function detectWeb(doc, url) {
if (doc.title.indexOf("Web of Science Results") != -1) {
return "multiple";
} else if (url.indexOf("full_record.do") != -1) {
return "journalArticle";
}
}',
}',
'function doWeb(doc, url) {
var ids = new Array();
if (detectWeb(doc, url) == "multiple") {
@ -12721,7 +12721,7 @@ REPLACE INTO translators VALUES ('594ebe3c-90a0-4830-83bc-9502825a6810', '1.0.0b
var sid = newDoc.evaluate(''//input[@name="selectedIds"]'', newDoc, null, XPathResult.ANY_TYPE, null).iterateNext().value;
var nid = newDoc.evaluate(''//input[@name="SID"]'', newDoc, null, XPathResult.ANY_TYPE, null).iterateNext().value;
var post2 = ''product=WOS&product_sid='' + nid + ''&plugin=&product_st_thomas=http://esti.isiknowledge.com:8360/esti/xrpc&export_ref.x=0&export_ref.y=0'';
var post = ''action=go&mode=quickOutput&product=WOS&SID='' + nid + ''&format=ref&fields=Bib&mark_id=WOS&count_new_items_marked=0&selectedIds='' + sid + ''&qo_fields=bib&endnote.x=95&endnote.y=12&save_options=default'';
var post = ''action=go&mode=quickOutput&product=WOS&SID='' + nid + ''&format=ref&fields=BibAbs&mark_id=WOS&count_new_items_marked=0&selectedIds='' + sid + ''&qo_fields=bib&endnote.x=95&endnote.y=12&save_options=default'';
Zotero.Utilities.HTTP.doPost(''http://apps.isiknowledge.com/OutboundService.do'', post, function() {
Zotero.Utilities.HTTP.doPost(''http://pcs.isiknowledge.com/uml/uml_view.cgi'', post2, function(text) {
var lines = text.split("\n");
@ -12759,6 +12759,8 @@ REPLACE INTO translators VALUES ('594ebe3c-90a0-4830-83bc-9502825a6810', '1.0.0b
item.pages = content;
} else if (field == "EP") {
item.pages += "-" + content;
} else if (field == "AB") {
item.abstractNote = content;
}
} else {
content = Zotero.Utilities.trimInternal(line);
@ -12767,6 +12769,8 @@ REPLACE INTO translators VALUES ('594ebe3c-90a0-4830-83bc-9502825a6810', '1.0.0b
item.creators.push({firstName:author[1], lastName:author[0], creatorType:"author"});
} else if (field == "TI") {
item.title += " " + content;
} else if (field == "AB") {
item.abstractNote += " " + content;
}
}
}