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.
N.B.:
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
Olaf
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.
N.B.:
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
Olaf
1. If you do want to edit the Zotero import, you'll have to edit the file RIS.js in the zotero data folder:
https://www.zotero.org/support/zotero_data
(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
https://github.com/zotero/translators/blob/master/RIS.js#L179
from
DP:"libraryCatalog,
to
LB:"libraryCatalog,
(that change will likely be overwritten by future update, but since this is for a one-time import, that actually seems preferable.)
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.
You want to use A3 for book editors.
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.
My suggestion would be to export all edited books separately, so that you can do a simple search&repalce in the RIS file.
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:
https://github.com/zotero/translators/blob/master/Endnote%20XML.js#L234