Running external JS files within Zotero

This discussion was created from comments split from: Feature request: More options for the javascript runner.
  • edited April 10, 2019
    I have a small (open source but not yet published as binary) extension that I use to run the BBT tests. Combined with the code-runner VSCode extension, you can just edit files and have them executed inside Zotero, and see the results in VSCode.

    (edit: https://github.com/retorquere/zotero-better-bibtex/tree/master/test/fixtures/debug-bridge)
  • I have just started reading about debug-bridge but have not yet started trying it out.
    I read that "code-runner VSCode extension" is required.

    Is it feasible to work with Atom code-runner instead of VSCode?
    I'm on Ubuntu 16.04. Atom is my main editor although I do have VS Code installed.
  • It should be feasible, I just haven't tried it. In the end both start an executable with the file you're editing and display the output; a bash one-liner calling curl should do it if the atom runner can't do it directly.
  • edited April 15, 2019
    I have not tested this yet. But if the Zotero JS scripts are held in either Atom or VSCode they can be called as snippets using short alias names and expanded and run through debug-bridge. In fact such snippets might be exchanged as packages through Atom/VSCode system. VSCode is a spinoff from Atom.

    In Atom snippets can be either global or local to a project. They are defined in a single file snippets.json.

    There are other auto-complete functions in Atom (I have VSCode installed but I only use Atom on Ubuntu).

    The bottom line is that either Atom or VSCode can be used as the IDE to connect to Zotero through debug-bridge.
  • Agreed, I just haven't tried with Atom.
Sign In or Register to comment.