improved BibTeX type mappings

This commit is contained in:
Simon Kornblith 2007-03-21 17:52:36 +00:00
parent b6e995d0fc
commit aead2c6329

View File

@ -1,4 +1,4 @@
-- 189 -- 190
-- ***** BEGIN LICENSE BLOCK ***** -- ***** BEGIN LICENSE BLOCK *****
-- --
@ -22,7 +22,7 @@
-- Set the following timestamp to the most recent scraper update date -- 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', 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) { '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"); 'Zotero.configure("dataMode", "block");
function detectImport() { function detectImport() {
@ -9508,9 +9508,8 @@ var typeMap = {
// supplements outputTypeMap for importing // supplements outputTypeMap for importing
var inputTypeMap = { var inputTypeMap = {
inproceedings:"conferencePaper", conference:"inproceedings",
conference:"journalArticle", techreport:"report",
techreport:"book",
booklet:"book", booklet:"book",
incollection:"bookSection", incollection:"bookSection",
manual:"book", manual:"book",
@ -9844,9 +9843,8 @@ function doExport() {
var item; var item;
while(item = Zotero.nextItem()) { while(item = Zotero.nextItem()) {
// determine type // determine type
if(!typeMap[item.itemType]) { var type = typeMap[item.itemType];
continue; if(!type) type = "misc";
}
// create a unique citation key // create a unique citation key
var basekey = ""; var basekey = "";
@ -9887,7 +9885,7 @@ function doExport() {
citekeys[citekey] = true; citekeys[citekey] = true;
// write citation key // write citation key
Zotero.write((first ? "" : ",\n\n") + "@"+typeMap[item.itemType]+"{"+citekey); Zotero.write((first ? "" : ",\n\n") + "@"+type+"{"+citekey);
first = false; first = false;
for(var field in fieldMap) { for(var field in fieldMap) {