Modify RIS

Is it possible to end the RIS export feed? I'd like to add a new field and I'm not sure how to go about doing this? I installed the Better BibTex add-on, which is awesome BTW, and I'd like to have the Citation Key exported win the RIS. Would this be possible? If so, how would I go about doing this?
«1
  • @emilianoeheyns are BBT citekeys exposed to regular translators? If so, how?
  • The item returned from nextItem() inside the translator has a citationKey field when BBT is installed. This is available to all translators.
  • Thanks. So, how would one go about modify the RIS translator to "citationKey". I'm new to this. The process is not clear to me. I saw the Scaffold tool, but I"m not sure what to modify or how.
  • I think it's as easy as adding
    LB:"citationKey", in the field map here:
    https://github.com/zotero/translators/blob/master/RIS.js#L177 (it's placement isn't relevant. That will put it into LB which is RIS label. You can use any other two letter combo that isn't already taken up for RIS, too.

    You can modify the RIS translator in Scaffold/Translator Editor -- I'd recommend creating a separate copy with a different ID and a slightly different name, so your version won't be overwritten with RIS updates.

    Then make sure to click the "Save to Zotero" (not the regular save) button in Scaffold. Note that you can't test export in Scaffold, so you'd have to do that straight from Zotero.

    I hope that's enough detail. Try it out and ask for help if you get stuck.
  • After a few false stars I actually got it working. :) I needed to add the citationkey ref. in two places and the LB tag in two others. All good. Not exactly sure what I'm doing, but it worked. :) Thanks.
  • After getting this to work, I'm not finding the Zotero is crashing about 50% of the time after I export and RIS citation. Is there a way I can send in a crash log so that you can see what might be wrong.
  • After a crash, can you send a BBT support log from the Help menu, and post the support log ID here? Then I can check whether it's BBT-related.
  • Crash as in freeze or as in shut down? If it's a freeze, I'd guess you may have built an infinite loop into the export.
  • edited April 11, 2021
    This works for me. This line is all I had to add.

    edit: the alignment looks weird because I use spaces rather than tabs, but it works. item.citationKey is always true-ish when BBT is installed, but with the IF statement the RIS exporter will keep working when BBT is uninstalled.
  • Here is the error: 1251791168.
  • Can you try whether my mod works for you? I can't access the log behind that id btw, but the zotero devs can.
  • Thank you. I've updated my RIS. js file with your fix and things are working better. :)
  • Better as in less crashes, or no crashes?
  • Less. Here is the last report: 814674794
  • I can't read those, only the zotero devs can, but does that mean my mod still crashes? and as @adamsmith asked, what do you mean by "crash" precisely?
  • edited April 11, 2021
    If you submit a log through "Help" -> "Send Better BibTeX support log" after a crash, I can read those. The log may tell me what you mean by "crash", but it's better if you tell us.
  • @emilianoeheyns so far so good! Thanks.
  • edited April 12, 2021
    I'm confused now. I asked "less crashes, or no crashes", and you said "less". Under the circumstances, that implies "some number greater than 0". At the same time you say "so far so good" which to me implies "no crashes". Do you still experience crashes, and if so, what do you see happening (or don't you see happening) that you mean when you say "crash"?
  • @emilianoeheyns Hi there, sorry for late reply. I meant that it is still crashing... here is another crash report. 1762834988. I just can't seem to get this to work and my productivity is getting zapped. Really need this to work. Any help you can provide, I'd be very gratefu.
  • Again -- I cannot not read these reports. I can only read reports sent through "Help" -> "Send Better BibTeX support log" after a crash. If the report ID does not end with "-euc" or "-apse" I cannot read them.
  • Here is another crash report: 1501697753
  • And we still very much need to know what you mean by "crash".
  • Holy moses dude do you even read my replies?
  • edited April 17, 2021
    @emilianoeheyns hey there. Thanks for your patience. I am not a developer and am unfamiliar with coding. I am doing my best. Yes, I'm reading your replies. I see now, however, that I was misreading your VERY clear instruction RE which error log reporting method I should use. I understand now. Sorry. :(. I see that you had told me what to do. I can see now why you're understandably frustrated with me.


    What I mean by crash: When I drag an entry from Zotero to my Tinderbox file, i.e. export a citation from Zotero to Tinderbox, Zotero unexpectedly closes and I am presented with a crash report. I then need to restart Zotero and start the whole process all over again. If you have another way of "defining" the term crash, please advise.

    I apologize if I am making the harder than it needs to be. I don't mean to. Clearly, I am displaying my ignorance of how the software works and how I'm supposed to add your modified RIS file properly into Zotero so it works properly.

    I do appreciate your support. If there is a step-by-step guide you can provide, I'd appreciate it on how I'm supposed to get your modified RIS file in, I'd appreciate it. I tried the translator editor, but again I'm stumbling around in the dark give my lack of skills in this area.
  • Ah, OK, you get an actual crash report. Sorry for pressing on this, but zotero crashes are rare, and people report all kinds of unexpected results as crashes. With this kind of crash, you can't send a log I can read; I'm not on the Zotero dev team, and only they can read the actual crash logs.

    What platform are you on? Windows, Linux, Mac?
  • edited April 17, 2021
    I think I have the crash report log working right now: NARRCZYY-euc. Feel like a dufoos.
    thank you!
  • I'd appreciate it on how I'm supposed to get your modified RIS file in
    You can download my modified RIS from https://gist.githubusercontent.com/retorquere/5a68351a5a1ed3a16c99e443872b43c5/raw/aad62f64f51ee31aa3acbed97fae57d9ad65a114/RIS.js and just drop it into the translators directory, then restart Zotero. But I thought you had already tried my RIS file?
  • edited April 17, 2021
    I see several exports happening in NARRCZYY-euc, and they're from my modded translator, but I see no errors in that log.
  • (if you're getting an actual crash log, the -euc/-apse logs don't help, because Zotero clears the logs on restart, so by the time you can send an -euc/-apse log, the error will have cleared from the logs)
  • Looks like I've got it working. Have been using it now for about 4 hours with no problems. Thanks for your help and patience.
Sign In or Register to comment.