plugin:runcommand
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:runcommand [2014-03-31 22:55] – [Installation] 87.11.58.31 | plugin:runcommand [2020-09-22 17:59] (current) – [Bugs] tomcat | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== runcommand | + | ====== runcommand |
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
author | author | ||
email : aelsantex[at]gmail.com | email : aelsantex[at]gmail.com | ||
type : Syntax | type : Syntax | ||
- | lastupdate : 2014-03-31 | + | lastupdate : 2014-04-01 |
- | compatible : Binky | + | compatible : Binky, !Hogfather, Greebo |
depends | depends | ||
conflicts | conflicts | ||
Line 17: | Line 17: | ||
---- | ---- | ||
+ | |||
+ | ===== Description ===== | ||
+ | This plugin executes a program on the fly and shows its output. | ||
+ | |||
+ | You can use it to generate reports from the system or to execute some administration steps. | ||
+ | |||
+ | For example, I use it to collect information from my enterprise servers (free space on disks, hardware status, etc.) | ||
+ | |||
+ | |||
===== News ===== | ===== News ===== | ||
Line 26: | Line 35: | ||
==== Plugin Installation ==== | ==== Plugin Installation ==== | ||
- | Download and install the plugin using the Plugin | + | Download and install the plugin using the [[plugin: |
- | If you want install manually follow this procedure: | + | Alternatively, |
- Download the zip file from github: [[https:// | - Download the zip file from github: [[https:// | ||
Line 39: | Line 48: | ||
Create a directory under DOKUWIKI_ROOT folder and set it into **script_dir** field of runcommand section under wiki configuration page. | Create a directory under DOKUWIKI_ROOT folder and set it into **script_dir** field of runcommand section under wiki configuration page. | ||
- | As default, I choose to set DOKUWIKI_ROOT/ | + | As default, I choose to set DOKUWIKI_ROOT/ |
===== Syntax ===== | ===== Syntax ===== | ||
Line 71: | Line 79: | ||
} | } | ||
| | ||
- | ===== Old Release ===== | ||
- | **ATTENTION** | ||
- | Below you can find the reference for the old version of runcommand. I keep it for a limited time only for compatibility with old version of dokuwiki. | + | ==== How to use ==== |
- | + | ||
- | + | ||
- | ==== Description ==== | + | |
- | This plugin executes a program on the fly and shows its output. | + | |
- | + | ||
- | You can use it to generate reports from the system or to execute some administration steps. | + | |
- | + | ||
- | For example, I use it to collect information from my enterprise servers (free space on disks, hardware status, etc.) | + | |
- | + | ||
- | + | ||
- | + | ||
- | ===== Download and Installation ===== | + | |
- | + | ||
- | It's quite easy: | + | |
- | * download this [[https:// | + | |
- | + | ||
- | * Create directory **scripts** under wiki installation and set it into script_dir field of runcommand section under wiki configuration page. As the default, I choose to put dir under // | + | |
- | ===== How to use ===== | + | |
Syntax is simple: | Syntax is simple: | ||
Line 102: | Line 90: | ||
// | // | ||
// | // | ||
- | //<arg-1 label>// | + | //<arg1 name>// |
... \\ | ... \\ | ||
- | //<arg-n label>// | + | //<argN name>// |
**</ | **</ | ||
+ | |||
// | // | ||
- | * **< | + | * **< |
+ | See [[# | ||
* **< | * **< | ||
Line 117: | Line 107: | ||
* **choice**: The user may choose one of the previous formats from a select field. | * **choice**: The user may choose one of the previous formats from a select field. | ||
- | * **<arg-X label> | + | |
+ | |||
+ | | ||
* **<arg type>**: One of the next values: | * **<arg type>**: One of the next values: | ||
Line 123: | Line 115: | ||
* **hidden**: Generate a hidden field. If you use a hidden field, the label isn't printed. | * **hidden**: Generate a hidden field. If you use a hidden field, the label isn't printed. | ||
* **list**: Generate a selectable list of values. | * **list**: Generate a selectable list of values. | ||
+ | * **autocomplete**: | ||
+ | * **slider**: Generate a slider with given minimum and maximum value. | ||
+ | * **spinner**: | ||
+ | * **date**: Generate a date field; the uses may be specify the date format. | ||
- | * **<arg value>**: The default value for a text and an hidden | + | * **<argument options X>**: Is specific for all field type. |
- | * **<item X>**: Is the value given by the list as argument. | + | * **hidden**: Fixed value associated to this argument. |
- | * **<label X>**: Is the label that the user sees in the list. | + | * **text**: The default value for this text field |
+ | * **list**: | ||
+ | | ||
+ | | ||
+ | * **spinner**: Require | ||
+ | * **date**: May be specified | ||
- | //**Example:**// | + | ==== Example |
In this example, I use the printf command to show the values of arguments. | In this example, I use the printf command to show the values of arguments. | ||
< | < | ||
- | command|printf " | + | command|printf " |
- | | + | |
- | | + | runButtonText|Esegui |
- | | + | |
- | | + | |
+ | | ||
+ | arg_autocomp|Test autocomplete|newline|autocomplete=ActionScript; | ||
+ | arg_slider|Test slider|newline|slider=min: | ||
+ | arg_spinner|Test spinner|newline|spinner=min: | ||
+ | arg_date|Test date|newline|date=format: | ||
</ | </ | ||
- | In this example I use the printf command to show the values of arguments without display the cancel button and with custom label for run button | + | {{https:// |
+ | |||
+ | In this example I use the printf command to show the values of arguments without display the cancel button and with custom label for run button. The fields are not on newline. | ||
< | < | ||
- | command|printf "==== Test ====\n\n__Result__\n\n * arg1=**$arg_1**\n * arg2=//$arg_2//\n * arg3=$arg_3\n\n < | + | command|sleep 1 ; printf "==== Test 2 ====\\n==== $arg_text ====\\n * valorelista: |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | arg 2|text=argomento 2 | + | |
- | | + | arg_autocomp|Test autocomplete||autocomplete=ActionScript; |
+ | arg_slider|Test slider|newline|slider=min: | ||
+ | arg_spinner|Test spinner||spinner=min: | ||
+ | arg_date|Test date||date= | ||
</ | </ | ||
- | + | {{https://raw.githubusercontent.com/aelsantex/public_images/master/runcommand_example2.png}} | |
- | == Runcommand before command execution == | + | |
- | + | ||
- | {{http://aelsantex.googlepages.com/runcommand1.jpeg|}} | + | |
- | + | ||
- | == Runcommand after command execution == | + | |
- | + | ||
- | {{http://aelsantex.googlepages.com/runcommand2.jpeg|}} | + | |
===== Configuration ===== | ===== Configuration ===== | ||
- | From wiki configuration' | + | From wiki configuration' |
* **safe_scripts**: | * **safe_scripts**: | ||
- | * **script_dir**: | + | * **script_dir**: |
- | * **syntax_debug**: Enable the debug (you can choice 4 level of debug) | + | * **debug_level**: Enable the debug of syntax page. 0 No debug, 3 max debug. |
- | * **postaction_debug**: Enable | + | * **rc_default_dateformat**: Specify |
- | + | ||
- | * **debug_log**: | + | |
===== Languages support ===== | ===== Languages support ===== | ||
- | Actually, runcommand supports only Italian and English languages. I'm really happy if anyone could contribute to the translation in other languages... ;) | + | Actually, runcommand supports only Italian and English languages |
+ | I'm really happy if anyone could contribute to the translation in other languages... ;) | ||
===== Bugs ===== | ===== Bugs ===== | ||
Line 184: | Line 187: | ||
Write here if you find a bug. | Write here if you find a bug. | ||
- | Some points to consider: | + | 2020.09.22 This Plugin stopped working with the release |
- | * < | + | |
- | * If you are using RewriteRules in Apache, or some other settings that convert slashes into underscores, | + | |
- | * Ensure that CSS and JavaScript compression | + | |
- | + | ||
- | -- Chris Usher | + | |
===== Discussion ===== | ===== Discussion ===== | ||
- | * --- // | + | <nowiki> |
- | * **fr/ | + | Hi, I can't get this plugin |
- | <?php | + | I've created the /data/scripts directory and generated a listfiles.sh file (chmod 755) |
- | /** | + | Even the example code doesn't work. It keeps showing the " |
- | * French language file | + | Any ideas? |
- | * | + | </nowiki> |
- | * @author | + | |
- | * @author | + | |
- | */ | + | |
- | + | ||
- | // custom language strings for the plugin | + | |
- | + | ||
- | $lang['btn_submit' | + | |
- | $lang[' | + | |
- | $lang[' | + | |
- | $lang[' | + | |
- | $lang[' | + | |
- | $lang[' | + | |
- | $lang[' | + | |
- | </code> | + | |
- | * **fr/settings.php**< | + | |
- | <?php | + | |
- | /** | + | |
- | * French language | + | |
- | * | + | |
- | * @author Alessandro Celli < | + | |
- | * @author | + | |
- | */ | + | |
- | + | ||
- | // for the configuration manager | + | |
- | + | ||
- | $lang['safe_scripts' | + | |
- | $lang[' | + | |
- | </ | + | |
- | + | ||
- | Hi Etienne, many thanks, I have included your translation but now I have introduced other 3 parameters. Can you help me to translate that? | + | |
- | + | ||
- | * --- // | + | |
- | + | ||
- | Can you give a simple script to test? | + | |
- | \\ I can not use this plug-in :S | + | |
- | + | ||
- | Ok, a little example for linux/unix users.. | + | |
- | Save the follow script into //scripts// directory as **printf** with execution permissions (rwxr--r--) and try to use given examples: | + | |
- | + | ||
- | <file bash printf> | + | |
- | #!/bin/bash | + | |
- | | + | |
- | </file> | + | |
- | + | ||
- | Hello! | + | |
- | * --- //Anonymous 31/07/2013 17:46// Hello, good plugin, but it conflicts with [[plugin: | ||
- | * I do some tests with this plugin for the next release. | ||
- | * --- //Fravadona 09/09/2013 16:01// Hello, I can't get it work with WeatherWax; it gives me a syntax error with your examples. Do I need to install JQuery which is obsolete on the actual version of Dokuwiki ? | + | < |
- | * I'm sorry, new version of plugins fix this problem, please wait for it! | + | Same problem here, did all the above steps and getting |
- | * | + | </ |
- | In Windows 7 Plugin to work, you must create the folder c:\tmp | + |
plugin/runcommand.1396299307.txt.gz · Last modified: 2014-03-31 22:55 by 87.11.58.31