Endnote import: how to map "label" to "library catalog"

I am helping out a friend to import her extensive Endnote Database into Zotero. She uses in Endnote the field "label" for information if she have the text as copy/book in her private "library".
Currently the import via RIS (as recomended in the documentation https://www.zotero.org/support/kb/importing_records_from_endnote) put the "label" information into a note object attached to the bibliographic record.
Now I would like to match the content of the field "label" from Endnote into the Zotero field "Library Catalog" (in German "Bibliothekskatalog").

So my question: Is there a way to customize the RIS import the way that I can match "label" (LB in RIS notation) into the "Library Catalogue"? I can imagine three solutions:
1. Most apreciated would be a way to customize the import-filter of Zotero.
2. If that is not possible (or too dificult to do) maybe a workaround would be to find out what Endnote/RIS field/code get matched into the "Library Catalog" field of Zotero and customize the Endnote Export Style appropriatly so that the "label" content get into that field (get "miscoded" into the field that will be imported into zotero). (only works if that field is not used otherwise in the Endnote Database to be imported)
3. If the Endnote Export Style can not be customized as in no 2 described it might be posible to change the RIS code with help of a search&replace script (regular expresion) in python or something like that.

I know this should not be a general matching implemented into zotero but looking for a personal customization solution.

Any help or suggestions are much appreciated
  • 2. is a bit easier: DP gets mapped to library catalog, so just doing a search and replace for "LB -" --> "DP -" should work nicely.

    1. If you do want to edit the Zotero import, you'll have to edit the file RIS.js in the zotero data folder:
    (make sure to edit with a text editor like notepad or, better yet, notepad++; don't use Word or WordPad)
    Specifically, you'd want to change line 179


    (that change will likely be overwritten by future update, but since this is for a one-time import, that actually seems preferable.)
  • (Btw. - wouldn't callNumber be the better field for this? But up to her, of course. Neither of these are used much in citation styles. Library Catalog is used for online sources in MLA style)
  • Thank you for your quick reply it works well with changing "LB" into "DP". I also changed "DP" into "LB" although not used the "Database Provider" field, otherwise the export did not had output, probably for defining the "DP" field twice.

    I stumbled into a nother matching problem: The Field "AU" is in Endnote filled with different information. When the Type of the Entry is "EDBOOK" (Edited Book) it means "Editor", when the Type of the Entry is Article or Book it means Author.
    I think I could solve this problem as well with the Output Style in Endnote, if I would now what Field-Code is matched into Editor in Zotero. In the Endnote Output Style there is a definition for each type of entry style so I could match the false Author Entry into the right Editor code.
    btw. this seems to be a problem that is relevant for all users of the endnote/RIS import.
  • yeah, we need to fix that, it's a bit of a mess unfortunately.
    You want to use A3 for book editors.
  • I tried that but got an error from the endnote export ("generic error"). within the endnote preview only the first editor is displayed as "A3" while the others are still "AU".

    I think the problem is, that in the output style there are aditional areas for handling of multiple authors and multiple editors. This is not specific to a specific entry-type but applied to all types. And here the rule is for authors marked with "AU" and for Editors with "A2".

    So I think this problem must be handled in the RIS.js file. I had a look at it (the link adamsmith provided in a comment before) and do not know where to handle it.
    As far as I understand first the Endnote type "EDBOOK" is matched to the zotero type "book". Than there are differentiated definitions into which field "AU" and "A3" is matched, but the differentiation is already by the Zotero types. The Problem is: when I match here "AU" to "creators/editor" this will work with edited books but monographys and other types are also matched to zotero "book" type where the mention of "AU" as author is perfectly right.
    Is there a possibility to differentiate "AU" handling in regard to the original "Endnote" Type (i.e. EDBOOK)?

    Another solution might be to script an search&replace as regular expression for the Endnote output before processing it into zotero-import routine.
  • yes, your description of what RIS.js does is exactly right. That's why I said it's a mess. Obviously it can be done - we probably need to set a flag for the EDBOOK item type and then test for it and handle its authors differently. That's obviously not trivial, so it won't happen super quickly. I don't think you can reasonably regex this, no. A python script that parses records and resets at every ER - would work, though that sounds like a bit of overkill.

    My suggestion would be to export all edited books separately, so that you can do a simple search&repalce in the RIS file.
  • What about the new endnote-xml import? I found it in the forum mentioned but not in the documentation. In xml it should be simpler to seperate all "author" elements that are childs of an "edited-book" element and change them into an "editor" element with an xslt. Is the xml-import meant for the Endnote RIS-output-style when selected "xml" instead of "txt" or is it a totally different output style in Endnote to be selected?
  • yes to both questions - it's Endnote's standard output when you select XML as format instead of plain text and yes, it should be a lot easier.
    all you'd need to do is to change "authors" to "tertiary-authors" for edited books.
    For the label issue you'd have to see what Endnote does on export, the mappings in the translator work similarly to RIS (for standard variables - slightly differently for authors) and start here:
  • thanks I will have a look into it tomorrow
  • I'll fix this later today. I have a fix already, but it sort of broke something else, so I need to do some debugging and I'm out of time right now.
  • Took a little longer, but this is now fixed. Update via Preferences -> General -> Update Now
  • Thank you, it works fine!
Sign In or Register to comment.