This is a template for project layout we propose for projects supporting ImJoy plugins. The overall organization is standard and your code can very well be use without ImJoy.
Click here to use this repo in ImJoy.
Additonal information for the files:
-
File
manifest.imjoy.json
: specifies how your ImJoy plugins will be shown in the ImJoy plugin import menu -
Folder
src
: your ImJoy plugin files along with other related source code. -
File
src/update_manifest.js
a script for updating the plugin manifest filemanifest.imjoy.json
, this generated file will be read by ImJoy.
You can place your imjoy plugin file (*.imjoy.html
) in any folder organization, once added, please run node src/update_manifest.js
to update the plugin list.
Note: in order to run the command, you need to install nodejs.
You can also setup a CI (e.g. Github Actions) to do this for every new commit.
The ImJoy plugin files can be used to generate a url which automatically opens ImJoy and installs your plugin with all dependencies.
This example install the template plugin: Template Plugin
Once the plugin is installed, click Template Plugin
in the plugin menu and follow the instructions in the dialog to install the Python Plugin Engine. You can then execute the plugin.
ImJoy plugins can have different tags determining how the plugin is shown in the interface and how it is executed, e.g. to allow processing either on a CPU or GPU. These tags can be set in the url, and you can provide different options to the user.