www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit af36412a117cfb844b6431f58eaeec4167d61147
parent e94c041c0da9918dbfa0c590e9656ae8b9fc25db
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu,  4 Feb 2010 02:34:04 +0000

Closes #1275, Map RIS ED tag to editor

Mapping both import and export. The spec doesn't actually give any indication that ED is for editors (and, given that AB isn't actually abstract, you can't really make assumptions when it comes to RIS), but other apps seem to put editors in ED

A forum user suggested that mixing and matching A1/A2 and ED caused creator data to be skipped altogether on import to EndNote. I haven't checked this, but I'm adding editor export to ED on the grounds that more data is better than less, and users can update other import filters if necessary.


Diffstat:
Mtranslators/RIS.js | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/translators/RIS.js b/translators/RIS.js @@ -8,7 +8,7 @@ "maxVersion":"", "priority":100, "inRepository":true, - "lastUpdated":"2009-07-16 10:35:00" + "lastUpdated":"2010-02-04 02:24:27" } Zotero.configure("dataMode", "line"); @@ -151,7 +151,10 @@ function processTag(item, tag, value) { } var names = value.split(/, ?/); item.creators.push({lastName:names[0], firstName:names[1], creatorType:tempType}); - } else if(tag == "A2" || tag == "ED") { + } else if(tag == "ED") { + var names = value.split(/, ?/); + item.creators.push({lastName:names[0], firstName:names[1], creatorType:"editor"}); + } else if(tag == "A2") { // contributing author (patent: assignee) if (item.itemType == "patent") { if (item.assignee) { @@ -422,6 +425,8 @@ function doExport() { // authors and inventors are primary creators if (item.creators[j].creatorType == "author" || item.creators[j].creatorType == "inventor") { risTag = "A1"; + } else if (item.creators[j].creatorType == "editor") { + risTag = "ED"; } else { risTag = "A2"; }