-
Notifications
You must be signed in to change notification settings - Fork 0
Plugin Configuration
##Plugin Configuration File
This file is located in the Plugin's base directory and must be called plugin.conf
. It contains the necessary information to define what sort of behavior a plugin has (One Shot, Period, or Persistent), and what resources is available for the plugin to load to the display.
These options can be redefined multiple times in the file. Typically, later declarations will override the previous declared. true
and false
values are currently case sensitive; they must be all lowercase.
These are the following options that can be added to the config file:
Option | Description | Optional | Expected Value | Dependent Options |
---|---|---|---|---|
description | Short description describing the plugin | YES | A one line string of characters | Nothing |
html-path | Path to the Plugin's html file that is sent to the display | YES | relative or absolute filepath | Nothing |
js-path:* | Path to the Plugin's javascript file to include with the Plugin client | YES | relative or absolute filepath | Nothing |
js-main-obj | Javascript class object name that is instantiated on Plugin load. Requires at least one JS path option with the class object defined | YES | a string referring to the class name | js-path |
css-path:* | Path to the Plugin's css file that is sent to the display | YES | relative or absolute filepath | Nothing |
script-path | Path to an executable file which updates the Plugin's display | YES | relative or absolute filepath | Nothing |
script-timer | Adds a Plugin to the master scheduler. Ignored if script-background is defined. |
YES | Expects an integer value representing seconds. Negative sign indicates One Shot Script execution. Plugin waits X number of seconds before execution. |
script-path and without script-background defined |
script-process | Pre-processing script outputs. | YES |
clear or append . clear will clear the Plugin client's div before adding script output. append will add new script output to the current script output. Only valid for One Shot or Periodic Scripts |
script-timer and script-path defined |
script-background | Sets a script to run as a Persistent Script in the background | YES |
true or false . Persistent Scripts ignore all other script options except script-path
|
script-path |
start-on-load | Indicates if a script should start when the Smart Reflect Server application is started | YES |
true or false
|
Nothing |
webgui-path | A path to an html file a plugin may refer to for its own web gui accessible by the plugin daemon gui | YES | Path to an html file. | Nothing |
NOTE: Any option not listed above will be ignored
The options marked with *
support multiple defined values. The value options must have a 'tag' suffix indicating a unique identifier for the file. For example:
js-path:0 = test.js
js-path:1 = test2.js
##Creating Comments
You can leave comments in the configuration file as long as #
is the first character in the line
##Sample plugin.conf
#This is a comment!
#set a css path to include for plugin's client
css-path:0=test.css
#set javascript path to include for plugin's client
js-path:0=test.js
#set html file to include for a plugin's client
html-path=test.html
#When javascript file loads, instantiate this class object
#Must contain a destroy function (no arguments)
js-main-obj="Test"
#make plugin start on mirror load
start-on-load=true