When/where did Applescript Support for Zotero appear?
I have read multiple posts in this Forum advising that Applescript support for Zotero does not exist.
So imagine my surprise when I noticed recently that Script Editor includes a fairly comprehensive Applescript dictionary for Zotero.
Is this a feature of one of the available extensions such as Better BibText?
Was Applescript support added with Zotero 5 and I just never noticed?
Or some other explanation?
So imagine my surprise when I noticed recently that Script Editor includes a fairly comprehensive Applescript dictionary for Zotero.
Is this a feature of one of the available extensions such as Better BibText?
Was Applescript support added with Zotero 5 and I just never noticed?
Or some other explanation?
Why is there any Applescript entry at all if it is completely unsupported?
For what it's worth, you don't need to use the citation dialog if you want to script this. You could use BBT's debug-bridge to trigger copying/returning of the currently selected item.
Zotero may offer a local HTTP API in the future that works similarly to the web API.
curl -v -H "Content-Type: application/javascript" --data-binary "const items = Zotero.getActiveZoteroPane().getSelectedItems(); return items.length ? Zotero.QuickCopy.getContentFromItems(items, Zotero.Prefs.get('export.quickCopy.setting'), null, true).text : ''" "http://127.0.0.1:23119/debug-bridge/execute?password=<debug-bridge password>"
Is there a similar method for uploading a new item via posting something to an appropriate standalone address?
(The application I have in mind is automating uploading of PDF files into Zotero if they appear in a particular directory - this would allow me to use Devonthink on an ipad as the place where I import documents that will eventually also appear in Zotero). (i.e. meet my requirement at https://forums.zotero.org/discussion/comment/362253#Comment_362253).
WRT to python, almost all of my test suite is in python, the debug bridge just allows my python code to talk to the running Zotero (eg https://github.com/retorquere/zotero-better-bibtex/blob/master/test/features/steps/zotero.py#L151)
What @dstillman says is entirely true; the debug bridge *is* trivial (just 60 lines of code), on purpose, because any complexity I add there is an avenue for potential bugs of its own which complicates testing, and that's what I originally wrote it for. If it has any use outside that, no problem, but it is mostly just there for my test harness. There isn't so much a "debug interface" as that it's a way to make the Javscript runner available to scripting rather than just posting it into Zotero. As to stable, the last change was 2 years ago to add a password requirement. It doesn't really do much and in that sense it's stable.