settings_scripts
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| settings_scripts [2022/04/01 17:30] – antreas | settings_scripts [2023/11/22 15:58] (current) – chris | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== External script ===== | ===== External script ===== | ||
| - | External scripts | + | External scripts |
| {{ :: | {{ :: | ||
| ==== Adding a new script ==== | ==== Adding a new script ==== | ||
| - | To configure a new script you need to provide the following information describing the script | + | To configure a new script you need to provide the following information describing the application |
| ^ Setting ^ Description ^ | ^ Setting ^ Description ^ | ||
| - | |Name| A unique name for the script used to fetch it and distinguish from other| | + | |Name| A unique name for the script, used to fetch and distinguish from other scripts| |
| - | |Command| The command line to execute, a bat file, cmd file or exe| | + | |Command| The command line to execute, a batch file, cmd or .exe file| |
| |Arguments| The arguments passed to the script | | |Arguments| The arguments passed to the script | | ||
| |Parameters| A dynamic list of parameters passed to the script by PMA.core| | |Parameters| A dynamic list of parameters passed to the script by PMA.core| | ||
| Line 19: | Line 19: | ||
| {{ : | {{ : | ||
| - | ==== Executing an script | + | ==== Parameters & command line arguments |
| - | To execute | + | The parameters define which query string parameters PMA.core should attempt to parse from the URL when a script is invoked. Then, the values of these parameters can be passed as command line arguments to the script, provided that they also appear in the arguments list contained within the braces. |
| - | [[https:// | + | |
| + | Here' | ||
| + | Let's assume we want to invoke a python | ||
| + | |||
| + | ^ Option ^ Value ^ | ||
| + | | Number | PythonScriptTest | | ||
| + | | Command| python.exe | | ||
| + | | Arguments | d: | ||
| + | | Parameters | slide_path - type = path, some_number - type = number | | ||
| + | |||
| + | We would invoke this script by crafting the following URL: | ||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | |||
| + | Then PMA.core would extract and validate the values " | ||
| + | |||
| + | |||
| + | '' | ||
| + | |||
| + | |||
| + | After successful execution, the complete output of the command invocation is returned to the client. | ||
| + | |||
| + | |||
| + | See also the [[https:// | ||
settings_scripts.1648827005.txt.gz · Last modified: by antreas
