Zotero client automation (how to programmatically saving urls in a headless enviornment)
I want to accomplish the following in a headless Linux server.
1). log into zotero.org
2). save reference by url (ignoring if already existed)
3). sync the changes to zotero.org
I prefer to use zotero client over zotero web API https://www.zotero.org/support/dev/web_api/v3/start because I also want to save the snapshot of the urls. And I don't want to flood zotero.org with my large collections of references (I want to check if references already exist before I save them).
It is indeed possible to automate zotero client with javascript https://www.zotero.org/support/dev/client_coding/javascript_api . There is a command line agument `jsconsole`, but this seems to require graphic interface. When I run `zotero --jsconsole`, `Error: no DISPLAY environment variable specified` is reported.
Is it possible to evaluate Javascript code in the headless mode of zotero?
One way I can think of is to create a plugin. But this seems to be too much of a hassle for me. Also how can I automatically install this plugin?
How do I login in the headless zotero? Is there any way to specify my zotero.org API token or change my configuration to use my pre-created token?
1). log into zotero.org
2). save reference by url (ignoring if already existed)
3). sync the changes to zotero.org
I prefer to use zotero client over zotero web API https://www.zotero.org/support/dev/web_api/v3/start because I also want to save the snapshot of the urls. And I don't want to flood zotero.org with my large collections of references (I want to check if references already exist before I save them).
It is indeed possible to automate zotero client with javascript https://www.zotero.org/support/dev/client_coding/javascript_api . There is a command line agument `jsconsole`, but this seems to require graphic interface. When I run `zotero --jsconsole`, `Error: no DISPLAY environment variable specified` is reported.
Is it possible to evaluate Javascript code in the headless mode of zotero?
One way I can think of is to create a plugin. But this seems to be too much of a hassle for me. Also how can I automatically install this plugin?
How do I login in the headless zotero? Is there any way to specify my zotero.org API token or change my configuration to use my pre-created token?
Here is a related problem. The solution mentioned here uses https://github.com/retorquere/zotero-better-bibtex/tree/master/test/fixtures/debug-bridge which let us evaluate javascript code.