commit 44225aa4d12284550dee993236d45c73f6b18f3c
parent 947190b29a3dd9f43b85857d7a6ed80e9894adde
Author: Dan Stillman <dstillman@zotero.org>
Date: Sun, 21 Aug 2011 05:27:23 +0000
Updated translators from GitHub
Diffstat:
3 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/repotime.txt b/repotime.txt
@@ -1 +1 @@
-2011-08-03 01:05:00
+2011-08-21 05:25:00
diff --git a/translators/BibTeX.js b/translators/BibTeX.js
@@ -14,7 +14,7 @@
"inRepository": true,
"translatorType": 3,
"browserSupport": "gcs",
- "lastUpdated": "2011-07-29 03:35:07"
+ "lastUpdated": "2011-08-16 15:07:38"
}
function detectImport() {
@@ -2109,11 +2109,20 @@ function doExport() {
if(Zotero.getOption("exportFileData")) {
if(item.attachments) {
var attachmentString = "";
+
for(var i in item.attachments) {
var attachment = item.attachments[i];
- attachmentString += ";" + attachment.title + ":" + attachment.path + ":" + attachment.mimeType;
+ if(attachment.defaultPath) { // For Zotero 3.0
+ attachment.saveFile(attachment.defaultPath, true);
+ attachmentString += ";" + attachment.title + ":" + attachment.defaultPath + ":" + attachment.mimeType;
+ } else if(attachment.path) { // For Zotero 2.1
+ attachmentString += ";" + attachment.title + ":" + attachment.path + ":" + attachment.mimeType;
+ }
+ }
+
+ if(attachmentString) {
+ writeField("file", attachmentString.substr(1));
}
- writeField("file", attachmentString.substr(1));
}
}
diff --git a/translators/Zotero RDF.js b/translators/Zotero RDF.js
@@ -10,7 +10,7 @@
"configOptions":{"getCollections":"true", "dataMode":"rdf/xml"},
"displayOptions":{"exportNotes":true, "exportFileData":false},
"inRepository":true,
- "lastUpdated":"2011-07-08 04:51:41"
+ "lastUpdated":"2011-08-16 15:07:21"
}
var item;
@@ -323,7 +323,10 @@ function generateItem(item, zoteroType, resource) {
}
// relative file path for attachment items
- if(item.path) {
+ if(item.defaultPath) { // For Zotero 3.0
+ item.saveFile(item.defaultPath, true);
+ Zotero.RDF.addStatement(resource, rdf+"resource", item.defaultPath, false);
+ } else if(item.path) { // For Zotero 2.1
Zotero.RDF.addStatement(resource, rdf+"resource", item.path, false);
}