Fork and use this repository to create custom OMERO CLI plugins.
- A basic implementation: src/omero_cli_template.py
(Change the name to match your plugin name
omero_cli_[PLUGIN].py) - "Entry point" for the CLI: src/omero/plugins/template.py
This directory structure
omero/plugins/[PLUGIN].pyis needed for the plugin to be discovered by the CLI. (Same here, it's recommended to change the name accordingly to[PLUGIN].py) - A basic integration test (which is run by Travis): test/integration/clitest/test_template.py
( -> rename to
test/integration/clitest/test_[PLUGIN].py) - Travis integration:
- .travis.yml Enables automatic Travis builds
- .gitmodules Pulls in the omero-test-infra repository as submodule (runs the integration tests)
- setup.py and README.rst so the plugin can be made
pipinstallable via PyPI
- Fork/Clone it.
- Rename the various files from
...template...to match your plugin name (see above),omero_cli_[PLUGIN].py,omero/plugins/[PLUGIN].py,test/integration/clitest/test_[PLUGIN].py. - Rename the
TemplateControlclass in src/omero_cli_template.py to[PLUGIN]Control. - Add your plugin implementation to the
[PLUGIN]Control. - Make sure your plugin is registered with the CLI with the right name, i. e. replace all occurrences of
register("template", ...)withregister("[PLUGIN]", ...)
- OMERO Python language bindings
- argparse Used for parsing command line arguments (the CLI uses version 1.1)