|
# Integrating Tools
|
|
# Integrating Tools
|
|
|
|
|
|
Tools must be added to the IFS tool list to be able to run. In the tool list ( https://github.com/ian-james/IFS/blob/master/ifs/tools/toolList.json ), you'll find a number of required properties for setting up your tool to display in the IFS
|
|
Tools must be added to an IFS tool list to be able to run.
|
|
|
|
* Language related tools should be appended to [toolList.json](https://github.com/ian-james/IFS/blob/master/ifs/tools/toolList.json)
|
|
|
|
* Programming related tools should be appended to [toolListProgramming.json](https://github.com/ian-james/IFS/blob/master/ifs/tools/toolListProgramming.json)
|
|
|
|
|
|
For simple integration, ie basic input types and form data, integration will be relatively straight forward. If you have complex or unimplemented preferences integration may require additional work.
|
|
For simple integration, i.e. basic input types and form data, it is sufficient to write your tool as described in [Creating Tools](https://github.com/ian-james/IFS/wiki/Creating-Tools/). If your tool is more complex and requires additional views, preferences options, etc. then you will need to hack in the necessary elements.
|
|
|
|
|
|
## JSON Tool Item
|
|
Tools should be added to a new subdirectory in `ifs/tools/`.
|
|
|
|
|
|
|
|
## Example JSON Tool Item
|
|
|
|
|
|
```javascript
|
|
```javascript
|
|
{ // A Single Tool Item
|
|
{ // A Single Tool Item
|
|
"displayName": "Spell Checker", // The user-friendly name of your program
|
|
"displayName": "Tool Name", // The user-friendly name of your program
|
|
"progName":"hunspell", // Full path name to file ( * Temporary * )
|
|
"description": "Short description of tool.", // The user-friendly description of your program/tool
|
|
"progfullName": "fullPath/to/tool.py" // Full path name to file
|
|
"author": "John Smith", // Full name of the author(s) of the program
|
|
|
|
"copyright": "Copyright © year", // Copyright declaration
|
|
|
|
"license": "Name of license", // Name of license, e.g. "ISC License", "GPLv3", "Public Domain"
|
|
|
|
"licenseFile": "path/to/LICENSE.txt"
|
|
|
|
"progName": "path/to/tool", // Full path name to file ( * Temporary * )
|
|
|
|
"progfullName": "path/to/tool" // Full path name to file
|
|
"runType": "cli", // Type whether visual, cli or other.
|
|
"runType": "cli", // Type whether visual, cli or other.
|
|
"parseCmd": "", // A command to parse extra data if needed, else leave blank
|
|
"parseCmd": "", // A command to parse extra data if needed, else leave blank
|
|
"defaultArg": "-a", // Parameters to automatically include.
|
|
"defaultArg": "-a", // The command line arguments the tool should always run with
|
|
"fileArgs": "-i", // Parameter to include a file
|
|
"fileArgs": "--infile", // The command line argument that specifies a file (if necessary)
|
|
"options" : [ { // An Array of options, that will be displayed via UI
|
|
"options" : [ { // An array of options, that will be displayed in the UI
|
|
"displayName": "Dictionary", // This describe what the html input on input
|
|
"displayName": "Option 1", // The user-friendly name of the option to be passed to the tool
|
|
"type": "select", // Menu input type
|
|
"type": "select", // Menu input type, can be "select", or "checkbox"
|
|
"values": [ "en_US", "en_GB"], // Selectable Values
|
|
"values": [ "en_US", "en_GB"], // Array of selectable values, in case of select input type
|
|
"name": "dictionary", // name to use in form
|
|
"name": "dictionary", // The name the option should use in the HTML form
|
|
"arg": "-d", // argument to add when selected.
|
|
"arg": "-d", // The command line argument that should be specified if the user enables it in the UI
|
|
"params":"" // Parameters is build up with all the arguments and values
|
|
"params":"" // Parameters is build up with all the arguments and values
|
|
}],
|
|
},
|
|
|
|
{
|
|
|
|
// more than one option object may be specified
|
|
|
|
}
|
|
|
|
],
|
|
}
|
|
}
|
|
```
|
|
```
|
|
|
|
|
... | @@ -30,4 +43,4 @@ For simple integration, ie basic input types and form data, integration will be |
... | @@ -30,4 +43,4 @@ For simple integration, ie basic input types and form data, integration will be |
|
Please review basicParse function in https://github.com/ian-james/IFS/blob/master/ifs/app/components/Tool/buildTool.js if you require additional more intensive form data for your tool.
|
|
Please review basicParse function in https://github.com/ian-james/IFS/blob/master/ifs/app/components/Tool/buildTool.js if you require additional more intensive form data for your tool.
|
|
|
|
|
|
## New Views
|
|
## New Views
|
|
If your tools requires an alternative view, ie is a new visualization or is not intended to be integrated into existing views, you will have to manage the route information passing formation between the feedback filter system and the end route. Please review how the feedback route receives data to integrate your new view. |
|
If your tools requires an alternative view, i.e. is a new visualization or is not intended to be integrated into existing views, you will have to manage the route information passing information between the feedback filter system and the end route. Please review how the feedback route receives data to integrate your new view. |
|
\ No newline at end of file |
|
\ No newline at end of file |