Import reference using command line/java

I'm attempting to create a piece of code that takes a bunch of reference (RIS) files, merges them into a single fie (probably using cat in command line), and then imports them into Zotero. Does anyone have any ideas how I might be able to achieve that final part?
  • In what context is that software running? From a general terminal? In the browser?
    What's the user story/use case more specifically?

    Zotero doesn't have an import API that's easily accessible from the CLI, but there may be workarounds depending on what you need exactly.
  • It could be done with https://forums.zotero.org/discussion/comment/348284/#Comment_348284 ; you can call code fairly easily to import a given file. But as mentioned, if we know more about your use-case, we may be able to suggest an easier way.

    The first thing that comes to mind really is that you could just talk to the Zotero API and rely on sync to get them back to your desktop client.
  • The first thing that comes to mind really is that you could just talk to the Zotero API
    There isn't an API endpoint for importing RIS, though you could pair it with a local instance of translation-server, which gives you API JSON that you can upload to the API.
  • Another option would be to just launch the RIS file via Zotero, which would show a prompt to import it, but that might be acceptable depending on the exact use case.
  • That last option works well enough for what I want it to do.
    Sorry I should have made the whole thing a bit clearer. I was working off the assumption that all the files were downloaded so an Automator app was the easiest way I could think of for general use. The Automator app takes the files you drop on it and runs them through a bash script that makes a temporary folder in which it puts all the files and cats them. This is all working fine but until this point I've had to pause the script until user confirmation while I imported the new file manually (forgetting you can just open an RIS and itll import itself. I used to use Endnote and I don't think it did that).
Sign In or Register to comment.