From f7d3ba4c21f8b2cdfd2e7d84168f95891a52cf54 Mon Sep 17 00:00:00 2001 From: Michael Berkowitz Date: Mon, 11 Feb 2008 19:58:36 +0000 Subject: [PATCH] Closes #927. Web of Science/Knowledge translator now imports abstract. --- scrapers.sql | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scrapers.sql b/scrapers.sql index dbc472852..de2bf045a 100644 --- a/scrapers.sql +++ b/scrapers.sql @@ -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; } } }