- use MODS abbreviated journal title when no full title is available

- make unAPI translator work as expected when asked to translate the same page twice
This commit is contained in:
Simon Kornblith 2007-03-19 22:52:28 +00:00
parent 0e0eb3bc10
commit ce14c017f6

View File

@ -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-19 22:41:38')); REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2007-03-19 22:51:00'));
REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b3.r1', '', '2006-12-15 03:40:00', 1, 100, 4, 'Amazon.com', 'Sean Takats', '^https?://(?:www\.)?amazon', REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b3.r1', '', '2006-12-15 03:40:00', 1, 100, 4, 'Amazon.com', 'Sean Takats', '^https?://(?:www\.)?amazon',
'function detectWeb(doc, url) { 'function detectWeb(doc, url) {
@ -3155,7 +3155,7 @@ function doWeb(doc, url) {
} }
}'); }');
REPLACE INTO translators VALUES ('e7e01cac-1e37-4da6-b078-a0e8343b0e98', '1.0.0b4r1', '', '2007-03-19 22:20:40', '1', '90', '4', 'unAPI', 'Simon Kornblith', '', REPLACE INTO translators VALUES ('e7e01cac-1e37-4da6-b078-a0e8343b0e98', '1.0.0b4r1', '', '2007-03-19 22:51:00', '1', '90', '4', 'unAPI', 'Simon Kornblith', '',
'var RECOGNIZABLE_FORMATS = ["mods", "marc", "endnote", "ris", "bibtex", "rdf"]; 'var RECOGNIZABLE_FORMATS = ["mods", "marc", "endnote", "ris", "bibtex", "rdf"];
var FORMAT_GUIDS = { var FORMAT_GUIDS = {
"mods":"0e2235e7-babf-413c-9acf-f27cce5f059c", "mods":"0e2235e7-babf-413c-9acf-f27cce5f059c",
@ -3366,6 +3366,9 @@ function getAllItems() {
} }
} }
// reset items
foundItems = [];
Zotero.done(); Zotero.done();
return; return;
} }
@ -7045,7 +7048,7 @@ REPLACE INTO translators VALUES ('af4cf622-eaca-450b-bd45-0f4ba345d081', '1.0.0b
Zotero.wait(); Zotero.wait();
}'); }');
REPLACE INTO translators VALUES ('0e2235e7-babf-413c-9acf-f27cce5f059c', '1.0.0b3.r1', '', '2007-03-19 22:41:38', 1, 50, 3, 'MODS', 'Simon Kornblith', 'xml', REPLACE INTO translators VALUES ('0e2235e7-babf-413c-9acf-f27cce5f059c', '1.0.0b3.r1', '', '2007-03-19 22:51:00', 1, 50, 3, 'MODS', 'Simon Kornblith', 'xml',
'Zotero.addOption("exportNotes", true); 'Zotero.addOption("exportNotes", true);
function detectImport() { function detectImport() {
@ -7495,7 +7498,8 @@ function doImport() {
if(relatedItem.@type == "host") { if(relatedItem.@type == "host") {
for each(var titleInfo in relatedItem.m::titleInfo) { for each(var titleInfo in relatedItem.m::titleInfo) {
if(titleInfo.@type == "abbreviated") { if(titleInfo.@type == "abbreviated") {
newItem.journalAbbreviation = titleInfo.m::title.text().toString() newItem.journalAbbreviation = titleInfo.m::title.text().toString();
if(!newItem.publicationTitle) newItem.publicationTitle = newItem.journalAbbreviation;
} else { } else {
newItem.publicationTitle = titleInfo.m::title.text().toString(); newItem.publicationTitle = titleInfo.m::title.text().toString();
} }