RIS import, tags on seperte lines are not separated

Hi,
I have been trying to import an RIS file exported from EndNote.

I have changed the incorrect AB tag to the correct N2 tag, and all seemed to go well. However, when I tried to sync online I got a tag-too-long error and found that the tags had not been imported correctly.

The original file contained

KW - Tag1
Tag2
Tag3
Tag4

In the end I got it to work by writing a script to make this

KW - Tag1
KW - Tag2
KW - Tag3
KW - Tag4

The RIS format specification in clear that EndNote's method is wrong, stating "Each keyword or phrase must be on its own line, preceded by this tag ['KW - ']." I know it sucks to bend the rules, but maybe zotero can be modified to be tolerant of this error?
  • I haven't tested this, but in theory this should already work:

    else if(tag == "KW") {
    // keywords/tags

    // technically, treating newlines as new tags breaks the RIS spec, but
    // it's required to work with EndNote
    item.tags = item.tags.concat(value.split("\n"));
    }


    Maybe it's due to Windows newlines? value.split(/[\n\r]{1,2}/)?
  • Hi Dan
    I thought about the new line markings too and used gedit to save a copy of the file with Windows new lines and a copy with Unix line endings. Both had the same behaviour.

    I did not physically check that the line endings were properly Win/Unix, but I've never had gedit mess that up before.
  • Sample record?
  • The suggested change doesn't work for me either.

    And the line endings are normalized within the translator to "\n" anyway:
    if(tag == "N1" || tag == "N2" || tag == "AB" || tag == "KW") {
    // preserve line endings for N1/N2/AB fields, for EndNote
    // compatibility
    data += "\n"+rawLine;
    }


    No clue on this yet... But I think does usually work for people.
Sign In or Register to comment.