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.
This commit is contained in:
Dan Stillman 2010-02-04 02:34:04 +00:00
parent e94c041c0d
commit af36412a11

View File

@ -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";
}