From 8c9f874ce9dc3df6d701740a3168d290fea5a120 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 12 Jul 2010 11:57:55 +0000 Subject: [PATCH] commit LeanneJParry's patch to allow BibTeX file export in JabRef format (http://forums.zotero.org/discussion/10825/?Focus=65967#Comment_65967) --- translators/BibTeX.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/translators/BibTeX.js b/translators/BibTeX.js index 478354674e..2a507e2827 100644 --- a/translators/BibTeX.js +++ b/translators/BibTeX.js @@ -13,6 +13,7 @@ Zotero.configure("dataMode", "block"); Zotero.addOption("exportCharset", "UTF-8"); +Zotero.addOption("exportFileData", false); function detectImport() { var maxChars = 1048576; // 1MB @@ -2072,6 +2073,15 @@ function doExport() { writeField("annote", note["note"]); } } + + if(Zotero.getOption("exportFileData")) { + if(item.attachments) { + for each(var attachment in item.attachments) { + writeField("file", ":" + attachment.path + ":" + attachment.mimeType); + } + } + } + Zotero.write("\n}"); } }