cli
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
cli [2012-01-20 20:01] – old revision restored Aleksandr | cli [2023-05-17 13:45] – [Finding more Cli plugins] removed compatibility limits andi | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Command Line Tools ====== | ====== Command Line Tools ====== | ||
- | [[DokuWiki]] comes with a few PHP scripts meant to be executed from the (UNIX) commandline of the DokuWiki server. **All those scripts are located in the ''< | + | [[DokuWiki]] comes with a few PHP scripts meant to be executed from the (UNIX) commandline of the DokuWiki server. **All the scripts are located in the ''< |
**Note:** In order to be able to use these scripts you need the PHP CLI interpreter installed on the system. | **Note:** In order to be able to use these scripts you need the PHP CLI interpreter installed on the system. | ||
Line 8: | Line 8: | ||
< | < | ||
- | $> chmod +x < | + | $> chmod +x ./bin/< |
- | $> ./< | + | $> ./bin/< |
</ | </ | ||
Line 15: | Line 15: | ||
< | < | ||
- | $> / | + | $> / |
</ | </ | ||
- | |||
===== dwpage.php ===== | ===== dwpage.php ===== | ||
**Note:** There have been problems reported with some plugins that rely on ACLs and authentication or the DokuWiki [[: | **Note:** There have been problems reported with some plugins that rely on ACLs and authentication or the DokuWiki [[: | ||
Line 33: | Line 32: | ||
commit: see $ dwpage.php --help=commit | commit: see $ dwpage.php --help=commit | ||
lock: see $ dwpage.php --help=lock | lock: see $ dwpage.php --help=lock | ||
+ | gmeta: see $ dwpage.php --help=gmeta | ||
+ | Displays metadata about a page. There is no ability to write | ||
+ | metadata, only read them. | ||
+ | e.g. $ dwpage.php -u < | ||
+ | can be "date modified" | ||
+ | <meta tag> returns all metadata. | ||
| | ||
OPTIONS | OPTIONS | ||
Line 38: | Line 43: | ||
e.g. $ ./ | e.g. $ ./ | ||
e.g. $ ./ | e.g. $ ./ | ||
+ | |||
+ | |||
===== indexer.php ===== | ===== indexer.php ===== | ||
Line 48: | Line 55: | ||
when the -c option is given the index is cleared first. | when the -c option is given the index is cleared first. | ||
| | ||
- | OPTIONS | + | OPTIONS |
-h, --help | -h, --help | ||
-c, --clear | -c, --clear | ||
-q, --quiet | -q, --quiet | ||
- | This needs to be run as the appropriate user and possibly the right directory to work. e.g. www-data in ~www-data | + | This needs to be run as the appropriate user and possibly the right directory to work. e.g. www-data in ~www-data |
+ | |||
+ | sudo -u www-data / | ||
+ | |||
+ | If you experience errors, please firstly check that you are calling the script in the //bin// path and not in the /// | ||
+ | |||
+ | When working with farms, you can define the animal variable while calling the script. Please note that this is on single command line. | ||
+ | animal=example ./ | ||
===== wantedpages.php ===== | ===== wantedpages.php ===== | ||
Line 75: | Line 90: | ||
Usage: striplangs.php [-h [-x]] [-e] [-k lang1[, | Usage: striplangs.php [-h [-x]] [-e] [-k lang1[, | ||
| | ||
- | Removes all languages from the installation, | + | Removes all languages from the installation, |
after the -k option. English language is never removed! | after the -k option. English language is never removed! | ||
| | ||
Line 84: | Line 99: | ||
-e, --english | -e, --english | ||
+ | ===== gittool.php ===== | ||
+ | |||
+ | Helps with maintaining DokuWiki and plugins installed via [[devel: | ||
+ | |||
+ | < | ||
+ | Usage: gittool.php < | ||
+ | |||
+ | Manage git repositories for DokuWiki and its plugins and templates. | ||
+ | |||
+ | EXAMPLE | ||
+ | |||
+ | $> ./ | ||
+ | $> ./ | ||
+ | $> ./ | ||
+ | |||
+ | COMMANDS | ||
+ | |||
+ | help | ||
+ | This help screen | ||
+ | |||
+ | clone < | ||
+ | Tries to install a known plugin or template (prefix with template:) via | ||
+ | git. Uses the DokuWiki.org plugin repository to find the proper git | ||
+ | repository. Multiple extensions can be given as parameters | ||
+ | |||
+ | install < | ||
+ | The same as clone, but when no git source repository can be found, the | ||
+ | extension is installed via download | ||
+ | |||
+ | repos | ||
+ | Lists all git repositories found in this DokuWiki installation | ||
+ | |||
+ | <any> | ||
+ | Any unknown commands are assumed to be arguments to git and will be | ||
+ | executed in all repositories found within this DokuWiki installation | ||
+ | </ | ||
+ | |||
+ | ===== plugin.php ===== | ||
+ | |||
+ | This tool gives access to all installed [[devel:CLI Plugins]]. Call it without any arguments to get a list of installed plugins: | ||
+ | |||
+ | ./ | ||
+ | |||
+ | Call the plugin' | ||
+ | |||
+ | ./ | ||
+ | |||
+ | |||
+ | ====Finding more CLI plugins==== | ||
+ | Use [[plugintype> | ||
+ | |||
+ | A summary of plugins which indicate CLI support: | ||
+ | |||
+ | ---- pluginquery ----- | ||
+ | SELECT: name, description | ||
+ | WHERE: | ||
+ | VALUES: 255, 512 | ||
+ | ----- | ||
+ | To implement such a plugin please have a look at the [[devel:cli plugins|CLI plugins development documentation]]. |
cli.txt · Last modified: 2024-01-31 23:58 by Klap-in