Fixes #610, Exported snapshots are imported as web links, attachments don't import at all
Broken by r1232 -- 'path' property isn't in uniqueFields Updated Zotero RDF translator pushed to repo
This commit is contained in:
parent
27960ad1f1
commit
3364d73b37
15
scrapers.sql
15
scrapers.sql
|
@ -1,4 +1,4 @@
|
||||||
-- 221
|
-- 222
|
||||||
|
|
||||||
-- ***** 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-04-25 23:40:00'));
|
REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2007-04-26 09:00: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) {
|
||||||
|
@ -7908,7 +7908,7 @@ function doImport() {
|
||||||
}
|
}
|
||||||
}');
|
}');
|
||||||
|
|
||||||
REPLACE INTO translators VALUES ('14763d24-8ba0-45df-8f52-b8d1108e7ac9', '1.0.0b4.r1', '', '2007-03-22 19:45:00', 1, 25, 2, 'Zotero RDF', 'Simon Kornblith', 'rdf',
|
REPLACE INTO translators VALUES ('14763d24-8ba0-45df-8f52-b8d1108e7ac9', '1.0.0b4.r1', '', '2007-04-26 09:00:00', 1, 25, 2, 'Zotero RDF', 'Simon Kornblith', 'rdf',
|
||||||
'Zotero.configure("getCollections", true);
|
'Zotero.configure("getCollections", true);
|
||||||
Zotero.configure("dataMode", "rdf");
|
Zotero.configure("dataMode", "rdf");
|
||||||
Zotero.addOption("exportNotes", true);
|
Zotero.addOption("exportNotes", true);
|
||||||
|
@ -8159,7 +8159,7 @@ function generateItem(item, zoteroType, resource) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// attachments
|
// child attachments
|
||||||
if(item.attachments) {
|
if(item.attachments) {
|
||||||
for each(var attachment in item.attachments) {
|
for each(var attachment in item.attachments) {
|
||||||
var attachmentResource = itemResources[attachment.itemID];
|
var attachmentResource = itemResources[attachment.itemID];
|
||||||
|
@ -8168,6 +8168,11 @@ function generateItem(item, zoteroType, resource) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// relative file path for attachment items
|
||||||
|
if(item.path) {
|
||||||
|
Zotero.RDF.addStatement(resource, rdf+"resource", item.path, false);
|
||||||
|
}
|
||||||
|
|
||||||
// seeAlso and tags
|
// seeAlso and tags
|
||||||
if(item.seeAlso) generateSeeAlso(resource, item.seeAlso);
|
if(item.seeAlso) generateSeeAlso(resource, item.seeAlso);
|
||||||
if(item.tags) generateTags(resource, item.tags);
|
if(item.tags) generateTags(resource, item.tags);
|
||||||
|
@ -8207,8 +8212,6 @@ function generateItem(item, zoteroType, resource) {
|
||||||
Zotero.RDF.addStatement(resource, n.bib+"pages", value, true);
|
Zotero.RDF.addStatement(resource, n.bib+"pages", value, true);
|
||||||
} else if(property == "extra") { // extra
|
} else if(property == "extra") { // extra
|
||||||
Zotero.RDF.addStatement(resource, n.dc+"description", value, true);
|
Zotero.RDF.addStatement(resource, n.dc+"description", value, true);
|
||||||
} else if(property == "path") { // path (attachments
|
|
||||||
Zotero.RDF.addStatement(resource, rdf+"resource", value, false);
|
|
||||||
} else if(property == "mimeType") { // mimeType
|
} else if(property == "mimeType") { // mimeType
|
||||||
Zotero.RDF.addStatement(resource, n.link+"type", value, true);
|
Zotero.RDF.addStatement(resource, n.link+"type", value, true);
|
||||||
} else if(property == "charset") { // charset
|
} else if(property == "charset") { // charset
|
||||||
|
|
Loading…
Reference in New Issue
Block a user