Plugin

Command-Line Script Runner

Publication ID: ICY-D2P3V5

Short Description

This plugin allows to run javascript scripts from the command-line. It needs java 1.8 or higher to work. The script to run and its parameter are defined in the file job.xml in the home folder of icy. See the example job.xml and the example script in the jar. To run a script from the command-line provide a job.xml file and run the plugin from the command-line, for example with: java -jar icy.jar --headless --execute plugins.volker.commandlinescriptrunner.CommandLineScriptRunner

Documentation

The plugin allows to run javascript scripts from the command-line.

Your script must contain a line

// PARAMETER START

and a line

// PARAMETER END

The plugin will define the variables for the input parameters and set the input values in this section. Note that everything between these two lines will be replaced when the script is run via the plugin. You can leave your own input parameter definitions in this section so that you can run the script from the script-editor as well.


The job.xml file must be in the icy-home folder. It must contain the name of the job, the path to the script-file and a list of parameters. For example:

<job title='Gaussian Blur Filter' type='script'>
    <path>./scripts/gaussian_blur.js</path>
    <parameter-list>
        <parameter name="sigmaX">1.6</parameter>
        <parameter name="sigmaY">1.6</parameter>
        <parameter name="sigmaZ">1.6</parameter>
        <parameter name="inputFolder">"/media/in/"</parameter>
        <parameter name="outputFolder">"/media/out/"</parameter>
    </parameter-list>
</job>

The list of parameters can be empty.

 

 

Leave a Review

Leave a review
Cancel review
View full changelog
Close changelog

Changelog

  • Version 0.0.1.0 • Released on: 2016-07-11 13:58:43
    Download