endnote 9 keyword import

Hi, I am using the RIS export style as suggested in the manual, and have exported my library to a text file. The Keywords for each record are all on one line, sometimes delimited by a semicolon, sometimes by a comma. They look fine in my endnote (That is, they show up individually in the terms list), but in Zotero are bunched together (one 'tag' being multiple keywords), as the import is only parsing at carriage returns. See the attached example from the RIS output file. Please advise as to how to import this successfully so that my 'tags' are useful?

TY - JOUR
AU - Adger, W.N.
PY - 2000
TI - Social and ecological resilience: are they related?
SP - 347-364
JF - Progress in Human Geography
VL - 24
IS - 3
KW - social resilience; ecological resilience; resilience;cultural geography; human ecology; resource dependency; sustainable development
N2 - Defines social resilience as the ability of groups to cope with external stresses and disturbances as a result of social and political and environmental change. Links social and ecological resilience.
ID - 33
ER -

TY - JOUR
AU - Adger, W.N.
PY - 2006
TI - Vulnerability
SP - 268-281
JF - Global Environmental Change
VL - 16
IS - 3
N1 - ACIA update
KW - Vulnerability,disasters,food security,hazards,ses,surprise,governance,Adaptation,resilience
ID - 607
ER -

Thanks!
  • Note: an easy work-around for the semi is just a search and replace in the text file, but the comma is not so easy because there are often commas in titles, abstracts, etc. (of course I can imagine a semi showing up here and there too, so not sure what the best option is.
  • Noone with any solutions to offer??
  • That is an old EndNote bug. The RIS specification states that keywords must be one-per-line:
    http://www.refman.com/support/risformat_tags_04.asp
    Here's a sed command to fix your file:sed -e '/^KW/ {s/[,;]\s*/\nKW - /g}' old.ris > new.risThis can be run on the command line in OS X and Linux. You may download it for Windows:
    http://gnuwin32.sourceforge.net/packages/sed.htm
  • you rock.. thanks. You just saved me the trouble of writing a perl script, which was clearly more effort than necessary.

    Thanks again
  • edited August 18, 2009
    Worked great.. but a note to others: first, don't add the new KW to each line, as this puts a KW in each of your tags after importing into Zotero. Second, sed doesn't use the \n for newline when inserting. Rather, you put a literal newline in, like this:

    sed -e '
    /^KW/ {
    s/[,;]\s*/\
    /g
    }' old > new
  • Worked great.. but a note to others: first, don't add the new KW to each line, as this puts a KW in each of your tags after importing into Zotero.
    This should not be the case. The spec calls for each keyword to be on a new line with this prefix & Zotero seems to handle this correctly. Perhaps you have a mix of line ending characters in your file? I don't know what would cause this issue & it might be worth taking a look at the RIS output of your sed run.
    Second, sed doesn't use the \n for newline when inserting.
    FreeBSD sed and GNU sed in bash both allow this. What system are you on? I suppose that It could be that your shell is eating the newline character. In which case, you'd want to use '\\n' or similar. I wonder if your use of the literal newline is what is causing the 'KW' import glitch you described.
  • Strange... I checked the input file for weird chars like you say but don't see anything.

    I'm using OSX, but have seen others online talk about this same issue with the \n. Look at this manual for sed, this particular section talks about needing to use literal newlines: http://www.grymoire.com/Unix/Sed.html#uh-nl

    Is the Zotero import looking for a certain number of spaces before or after the dash? maybe i put too many or too few..

    Anyway its all correctly imported now, worked fine without the KW on each line. Thanks for your help!
  • Is the Zotero import looking for a certain number of spaces before or after the dash? maybe i put too many or too few..
    The RIS spec requires two before and one after.
  • edited October 3, 2009
    (EndNote apparently considers semicolon and newline both as legal separators for keywords, and it exports semicolon separated keywords in (its own) XML each separately.)

    I'm not sure about their origin - but I also got a lot of semicolons in my EndNote library keywords. One solution to the problem is as described above. Another one, for those uncomfortable with command line, is as following.

    In EndNote, it's possible to perform search-and-replace on specific fileds on the whole library:

    Select menu "Edit --> Change text...". In the dialog, select in "Keywords", type a semicolon into the "Search For:" field, go to "Change the text to:" field, select "Insert Special --> Carriage Return", press "Change". Now you have changed the keywords separator to a newline. The RIS file produced is still buggy, as discussed by noksagt above, but Zotero can read it and properly import all keywords. Tested with EN X and EN X3, probably works with earlier versions, if not - you may download EN X3 as trial version.

    For comma separated keywords, I would first perform a search ("References --> Search References...", search in "Keywords" field only), as comma may be a part of a keyword. If it's nowhere a case - just do a search-and replace in the same manner.
Sign In or Register to comment.