diff --git a/.doctrees/develop/scripts/example1.doctree b/.doctrees/develop/scripts/example1.doctree index 948bd7b0..a6bf41f9 100644 Binary files a/.doctrees/develop/scripts/example1.doctree and b/.doctrees/develop/scripts/example1.doctree differ diff --git a/.doctrees/develop/scripts/interface.doctree b/.doctrees/develop/scripts/interface.doctree index 09078147..3c0b2d5c 100644 Binary files a/.doctrees/develop/scripts/interface.doctree and b/.doctrees/develop/scripts/interface.doctree differ diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index 109bd637..67043f98 100644 Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ diff --git a/_images/image-1.png b/_images/image-1.png new file mode 100644 index 00000000..0f78a175 Binary files /dev/null and b/_images/image-1.png differ diff --git a/_images/image-2.png b/_images/image-2.png new file mode 100644 index 00000000..20674197 Binary files /dev/null and b/_images/image-2.png differ diff --git a/_images/image-3.png b/_images/image-3.png new file mode 100644 index 00000000..3f2a002c Binary files /dev/null and b/_images/image-3.png differ diff --git a/_images/image-4.png b/_images/image-4.png new file mode 100644 index 00000000..33e55f21 Binary files /dev/null and b/_images/image-4.png differ diff --git a/_images/image-5.png b/_images/image-5.png new file mode 100644 index 00000000..0c8ce3bd Binary files /dev/null and b/_images/image-5.png differ diff --git a/_images/image-6.png b/_images/image-6.png new file mode 100644 index 00000000..b6a9bcdc Binary files /dev/null and b/_images/image-6.png differ diff --git a/_images/image.png b/_images/image.png new file mode 100644 index 00000000..53674863 Binary files /dev/null and b/_images/image.png differ diff --git a/_sources/develop/scripts/example1.md.txt b/_sources/develop/scripts/example1.md.txt index d4606b25..b175c7ef 100644 --- a/_sources/develop/scripts/example1.md.txt +++ b/_sources/develop/scripts/example1.md.txt @@ -75,5 +75,9 @@ def getOptions(): return opts ``` The getOptions function is used to specify the [script Interfaces](https://two.avogadro.cc/scripts/inte**rface.html#script-interfaces) or **the pop-up menu** for the script. For each option in the userOptions list, Avogadro will create appropriate labels, menus, text boxes, check boxes, etc. -It is called when `--print-options` is given as the input argument. +Interface will look something like this: + + + +It is called in the command line when `--print-options` is given as the input argument. diff --git a/_sources/develop/scripts/interface.md.txt b/_sources/develop/scripts/interface.md.txt index faafd3de..fa53dede 100644 --- a/_sources/develop/scripts/interface.md.txt +++ b/_sources/develop/scripts/interface.md.txt @@ -23,6 +23,7 @@ be specified in the `userOptions` block as: } } ``` + Here, "Parameter Name" is the default label that will be displayed in the GUI as a label next to the combo box. If you wish to have the label @@ -38,6 +39,7 @@ differ from the JSON key, you can add a "label" key pair: } } ``` + Use of the "label" is optional, but encouraged, since it greatly facilitates translation and localization (e.g., "color" vs. "colour"). @@ -62,10 +64,11 @@ optimization) via: } } ``` - This will add a blank text box to the GUI, initialized with the text specified by default. + + ## Existing files A script can ask for the absolute path to an existing file using the @@ -81,10 +84,11 @@ following option block: } } ``` - This will add an option to select a file to the GUI, initialized to the file pointed to by default. + + ## Integer Values Scripts may request integer values from a specified range by adding a @@ -104,9 +108,10 @@ user-option of the following form: } } ``` - This block will result in a QSpinBox, configured as follows: + + - minimum and maximum indicate the valid range of integers for the parameter. - default is the integer value that will be shown initially. @@ -154,3 +159,5 @@ requested: This will result in a check box in the dynamically generated GUI, with the initial check state shown in default. + + \ No newline at end of file diff --git a/_static/image-1.png b/_static/image-1.png new file mode 100644 index 00000000..0f78a175 Binary files /dev/null and b/_static/image-1.png differ diff --git a/_static/image-2.png b/_static/image-2.png new file mode 100644 index 00000000..20674197 Binary files /dev/null and b/_static/image-2.png differ diff --git a/_static/image-3.png b/_static/image-3.png new file mode 100644 index 00000000..3f2a002c Binary files /dev/null and b/_static/image-3.png differ diff --git a/_static/image-4.png b/_static/image-4.png new file mode 100644 index 00000000..33e55f21 Binary files /dev/null and b/_static/image-4.png differ diff --git a/_static/image-5.png b/_static/image-5.png new file mode 100644 index 00000000..0c8ce3bd Binary files /dev/null and b/_static/image-5.png differ diff --git a/_static/image-6.png b/_static/image-6.png new file mode 100644 index 00000000..b6a9bcdc Binary files /dev/null and b/_static/image-6.png differ diff --git a/_static/image.png b/_static/image.png new file mode 100644 index 00000000..53674863 Binary files /dev/null and b/_static/image.png differ diff --git a/develop/scripts/example1.html b/develop/scripts/example1.html index a175074e..4a7227c1 100644 --- a/develop/scripts/example1.html +++ b/develop/scripts/example1.html @@ -591,7 +591,9 @@
The getOptions function is used to specify the script Interfaces or the pop-up menu for the script. For each option in the userOptions list, Avogadro will create appropriate labels, menus, text boxes, check boxes, etc.
-It is called when --print-options
is given as the input argument.
It is called in the command line when --print-options
is given as the input argument.
Here, “Parameter Name” is the default label that will be displayed in the GUI as a label next to the combo box. If you wish to have the label differ from the JSON key, you can add a “label” key pair:
@@ -536,6 +537,7 @@Use of the “label” is optional, but encouraged, since it greatly facilitates translation and localization (e.g., “color” vs. “colour”).
The array of strings in values will be used as the available entries in @@ -559,6 +561,7 @@
minimum and maximum indicate the valid range of integers for the parameter.