From aead2c6329aa06931c17ab947629a40bc2a6acd3 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Wed, 21 Mar 2007 17:52:36 +0000 Subject: [PATCH] improved BibTeX type mappings --- scrapers.sql | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/scrapers.sql b/scrapers.sql index bb81d0a7c..919161c30 100644 --- a/scrapers.sql +++ b/scrapers.sql @@ -1,4 +1,4 @@ --- 189 +-- 190 -- ***** BEGIN LICENSE BLOCK ***** -- @@ -22,7 +22,7 @@ -- Set the following timestamp to the most recent scraper update date -REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2007-03-21 18:00:00')); +REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2007-03-21 18:05:00')); REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b4.r1', '', '2007-03-21 15:26:54', '1', '100', '4', 'Amazon.com', 'Sean Takats', '^https?://(?:www\.)?amazon', 'function detectWeb(doc, url) { @@ -9443,7 +9443,7 @@ function doExport() { } }'); -REPLACE INTO translators VALUES ('9cb70025-a888-4a29-a210-93ec52da40d4', '1.0.0b3.r1', '', '2007-03-21 16:13:39', 1, 100, 3, 'BibTeX', 'Simon Kornblith', 'bib', +REPLACE INTO translators VALUES ('9cb70025-a888-4a29-a210-93ec52da40d4', '1.0.0b3.r1', '', '2007-03-21 18:05:00', 1, 100, 3, 'BibTeX', 'Simon Kornblith', 'bib', 'Zotero.configure("dataMode", "block"); function detectImport() { @@ -9508,9 +9508,8 @@ var typeMap = { // supplements outputTypeMap for importing var inputTypeMap = { - inproceedings:"conferencePaper", - conference:"journalArticle", - techreport:"book", + conference:"inproceedings", + techreport:"report", booklet:"book", incollection:"bookSection", manual:"book", @@ -9844,9 +9843,8 @@ function doExport() { var item; while(item = Zotero.nextItem()) { // determine type - if(!typeMap[item.itemType]) { - continue; - } + var type = typeMap[item.itemType]; + if(!type) type = "misc"; // create a unique citation key var basekey = ""; @@ -9887,7 +9885,7 @@ function doExport() { citekeys[citekey] = true; // write citation key - Zotero.write((first ? "" : ",\n\n") + "@"+typeMap[item.itemType]+"{"+citekey); + Zotero.write((first ? "" : ",\n\n") + "@"+type+"{"+citekey); first = false; for(var field in fieldMap) {