From 1967489a128fcc2b3a66056abb84b74b66831fbc Mon Sep 17 00:00:00 2001 From: Michael Berkowitz Date: Thu, 29 Nov 2007 15:17:41 +0000 Subject: [PATCH] Re-addresses #843 to handle the difference between %J and %B tags correctly. --- scrapers.sql | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scrapers.sql b/scrapers.sql index 4bbf160c7..c4685eec5 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', '2007-11-28 16:30:00')); +REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2007-11-29 16: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) { @@ -15354,7 +15354,7 @@ function doExport() { } }'); -REPLACE INTO translators VALUES ('881f60f2-0802-411a-9228-ce5f47b64c7d', '1.0.0b4.r5', '', '2007-11-28 16:30:00', '1', '100', '3', 'EndNote/Refer/BibIX', 'Simon Kornblith', 'txt', +REPLACE INTO translators VALUES ('881f60f2-0802-411a-9228-ce5f47b64c7d', '1.0.0b4.r5', '', '2007-11-29 16:00:00', '1', '100', '3', 'EndNote/Refer/BibIX', 'Simon Kornblith', 'txt', 'Zotero.configure("dataMode", "line"); function detectImport() { @@ -15596,9 +15596,13 @@ function doExport() { if(item[fieldMap[j]]) addTag(j, item[fieldMap[j]]); } - //use input field map - for (var k in inputFieldMap) { - if(item[inputFieldMap[k]]) addTag(k, item[inputFieldMap[k]]); + //handle J & B tags correctly + if (item["publicationTitle"]) { + if (item.itemType == "journalArticle") { + addTag("J", item["publicationTitle"]); + } else if (item.itemType == "bookSection") { + addTag("B", item["publicationTitle"]); + } } // creators