closes #567, MARC scraper issues with international characters
This commit is contained in:
parent
4e98dc8c02
commit
f37847e752
40
scrapers.sql
40
scrapers.sql
|
@ -1,4 +1,4 @@
|
||||||
-- 191
|
-- 192
|
||||||
|
|
||||||
-- ***** 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 23:15:00'));
|
REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2007-03-22 14:50: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) {
|
||||||
|
@ -7048,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-20 17:50:13', 1, 50, 3, 'MODS', 'Simon Kornblith', 'xml',
|
REPLACE INTO translators VALUES ('0e2235e7-babf-413c-9acf-f27cce5f059c', '1.0.0b3.r1', '', '2007-03-22 14:50:00', 1, 50, 3, 'MODS', 'Simon Kornblith', 'xml',
|
||||||
'Zotero.addOption("exportNotes", true);
|
'Zotero.addOption("exportNotes", true);
|
||||||
|
|
||||||
function detectImport() {
|
function detectImport() {
|
||||||
|
@ -7264,7 +7264,7 @@ function doExport() {
|
||||||
identifier.identifier += <identifier type="issn">{item.ISSN}</identifier>;
|
identifier.identifier += <identifier type="issn">{item.ISSN}</identifier>;
|
||||||
}
|
}
|
||||||
if(item.DOI) {
|
if(item.DOI) {
|
||||||
identifier.identifier += <identifier type="doi">{item.DOI}</identifier>;
|
mods.identifier += <identifier type="doi">{item.DOI}</identifier>;
|
||||||
}
|
}
|
||||||
|
|
||||||
// XML tag relatedItem.titleInfo; object field publication
|
// XML tag relatedItem.titleInfo; object field publication
|
||||||
|
@ -7354,6 +7354,18 @@ function doExport() {
|
||||||
Zotero.write(modsCollection.toXMLString());
|
Zotero.write(modsCollection.toXMLString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function processIdentifiers(newItem, identifier) {
|
||||||
|
for each(var myIdentifier in identifier) {
|
||||||
|
if(myIdentifier.@type == "isbn") {
|
||||||
|
newItem.ISBN = myIdentifier.text().toString()
|
||||||
|
} else if(myIdentifier.@type == "issn") {
|
||||||
|
newItem.ISSN = myIdentifier.text().toString()
|
||||||
|
} else if(myIdentifier.@type == "doi") {
|
||||||
|
newItem.DOI = myIdentifier.text().toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function doImport() {
|
function doImport() {
|
||||||
var marcGenres = {
|
var marcGenres = {
|
||||||
"book":"book",
|
"book":"book",
|
||||||
|
@ -7508,7 +7520,7 @@ function doImport() {
|
||||||
|
|
||||||
/** SUPPLEMENTAL FIELDS **/
|
/** SUPPLEMENTAL FIELDS **/
|
||||||
|
|
||||||
var part = false, originInfo = false, identifier = false;
|
var part = false, originInfo = false;
|
||||||
|
|
||||||
// series
|
// series
|
||||||
for each(var relatedItem in mods.m::relatedItem) {
|
for each(var relatedItem in mods.m::relatedItem) {
|
||||||
|
@ -7523,7 +7535,7 @@ function doImport() {
|
||||||
}
|
}
|
||||||
part = relatedItem.m::part;
|
part = relatedItem.m::part;
|
||||||
originInfo = relatedItem.m::originInfo;
|
originInfo = relatedItem.m::originInfo;
|
||||||
identifier = relatedItem.m::identifier;
|
processIdentifiers(newItem, relatedItem.m::identifier);
|
||||||
} else if(relatedItem.@type == "series") {
|
} else if(relatedItem.@type == "series") {
|
||||||
newItem.series = relatedItem.m::titleInfo.m::title.text().toString();
|
newItem.series = relatedItem.m::titleInfo.m::title.text().toString();
|
||||||
newItem.seriesTitle = relatedItem.m::titleInfo.m::partTitle.text().toString();
|
newItem.seriesTitle = relatedItem.m::titleInfo.m::partTitle.text().toString();
|
||||||
|
@ -7536,7 +7548,6 @@ function doImport() {
|
||||||
if(!part) {
|
if(!part) {
|
||||||
part = mods.m::part;
|
part = mods.m::part;
|
||||||
originInfo = mods.m::originInfo;
|
originInfo = mods.m::originInfo;
|
||||||
identifier = mods.m::identifier;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(part) {
|
if(part) {
|
||||||
|
@ -7568,7 +7579,7 @@ function doImport() {
|
||||||
|
|
||||||
// pages
|
// pages
|
||||||
for each(var extent in part.m::extent) {
|
for each(var extent in part.m::extent) {
|
||||||
if(extent.@unit == "pages") {
|
if(extent.@unit == "pages" || extent.@unit == "page") {
|
||||||
var pagesStart = extent.m::start.text().toString();
|
var pagesStart = extent.m::start.text().toString();
|
||||||
var pagesEnd = extent.m::end.text().toString();
|
var pagesEnd = extent.m::end.text().toString();
|
||||||
if(pagesStart || pagesEnd) {
|
if(pagesStart || pagesEnd) {
|
||||||
|
@ -7584,6 +7595,8 @@ function doImport() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// identifier
|
||||||
|
processIdentifiers(newItem, mods.m::identifier);
|
||||||
// edition
|
// edition
|
||||||
newItem.edition = originInfo.m::edition.text().toString();
|
newItem.edition = originInfo.m::edition.text().toString();
|
||||||
// place
|
// place
|
||||||
|
@ -7613,17 +7626,6 @@ function doImport() {
|
||||||
// accessDate
|
// accessDate
|
||||||
newItem.accessDate = originInfo.m::dateCaptured.text().toString();
|
newItem.accessDate = originInfo.m::dateCaptured.text().toString();
|
||||||
|
|
||||||
// identifiers
|
|
||||||
for each(var myIdentifier in identifier) {
|
|
||||||
if(myIdentifier.@type == "isbn") {
|
|
||||||
newItem.ISBN = myIdentifier.text().toString()
|
|
||||||
} else if(myIdentifier.@type == "issn") {
|
|
||||||
newItem.ISSN = myIdentifier.text().toString()
|
|
||||||
} else if(myIdentifier.@type == "doi") {
|
|
||||||
newItem.DOI = myIdentifier.text().toString()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// call number
|
// call number
|
||||||
newItem.callNumber = mods.m::classification.text().toString();
|
newItem.callNumber = mods.m::classification.text().toString();
|
||||||
// archiveLocation
|
// archiveLocation
|
||||||
|
|
Loading…
Reference in New Issue
Block a user