diff --git a/docs/customization/custom-scripts.md b/docs/customization/custom-scripts.md index b2112fee7..b209b8115 100644 --- a/docs/customization/custom-scripts.md +++ b/docs/customization/custom-scripts.md @@ -42,7 +42,7 @@ Defining script variables is optional: You may create a script with only a `run( Any output generated by the script during its execution will be displayed under the "output" tab in the UI. -By default, scripts within a module are ordered alphabetically in the scripts list page. To return scripts in a specific order, you can define the `script_order` variable at the end of your module. The `script_order` variable is a tuple which contains each Script class in the desired order. Any scripts that are omitted from this list will be listed last. To omit scripts from display entirely, define the `script_hide` variable at the end of your module. Scripts listed in this tuple will be ommitted from the unordered script listing. +By default, scripts within a module are ordered alphabetically in the scripts list page. To return scripts in a specific order, you can define the `script_order` variable at the end of your module. The `script_order` variable is a tuple which contains each Script class in the desired order. Any scripts that are omitted from this list will be listed last. To omit scripts from display entirely, define the `script_hide` variable at the end of your module. Scripts listed in this tuple will be ommitted from the unordered script listing. This is useful for hiding intermediate subclasses of Script, for example. ```python from extras.scripts import Script @@ -53,8 +53,14 @@ class MyCustomScript(Script): class AnotherCustomScript(Script): ... -script_order = (MyCustomScript, AnotherCustomScript) -script_hide = (MyHiddenScript,) +class MyScriptClass(Script): + ... + +class MyScriptSubclass(MyScriptSubclass): + ... + +script_order = (MyCustomScript, AnotherCustomScript, MyScriptSubclass) +script_hide = (MyScriptClass,) ``` ## Module Attributes