cli
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cli [2012-01-20 18:54] – index.html 78.185.50.164 | cli [2024-01-31 23:58] (current) – [Finding more CLI plugins] Klap-in | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Command Line Tools ====== | ||
- | <!-- saved from url=(0022)http://internet.e-mail --><title>Hacked | + | [[DokuWiki]] comes with a few PHP scripts meant to be executed |
+ | |||
+ | **Note:** In order to be able to use these scripts you need the PHP CLI interpreter installed on the system. | ||
+ | |||
+ | There are two ways to run the scripts. You can either make them executable: | ||
+ | |||
+ | < | ||
+ | $> chmod +x ./bin/< | ||
+ | $> ./bin/<script>.php | ||
+ | </code> | ||
+ | |||
+ | or run them as follows (recommended): | ||
+ | |||
+ | <code> | ||
+ | $> / | ||
+ | </code> | ||
+ | ===== dwpage.php | ||
+ | **Note:** There have been problems reported with some plugins that rely on ACLs and authentication or the DokuWiki [[: | ||
+ | |||
+ | Usage: dwpage.php [opts] | ||
+ | |||
+ | Utility to help command line DokuWiki page editing, allow | ||
+ | pages to be checked out for editing then committed after changes | ||
+ | |||
+ | Normal operation would be; | ||
+ | |||
+ | |||
+ | ACTIONS | ||
+ | checkout: see $ dwpage.php --help=checkout | ||
+ | commit: see $ dwpage.php --help=commit | ||
+ | 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 | ||
+ | can be "date modified" | ||
+ | <meta tag> returns all metadata. | ||
+ | |||
+ | OPTIONS | ||
+ | -h, --help=<action>: get help | ||
+ | e.g. $ ./dwpage.php -hcommit | ||
+ | e.g. $ ./dwpage.php --help=commit | ||
+ | |||
+ | |||
+ | |||
+ | ===== indexer.php | ||
+ | |||
+ | Allows you to update the [[search]] index. | ||
+ | |||
+ | Usage: indexer.php | ||
+ | |||
+ | Updates the searchindex by indexing all new or changed pages | ||
+ | when the -c option is given the index is cleared first. | ||
+ | |||
+ | OPTIONS | ||
+ | | ||
+ | | ||
+ | -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 under debian lenny. So for example, if your wiki is in '' | ||
+ | |||
+ | 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 ///lib/exe//. | ||
+ | |||
+ | 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 ./bin/indexer.php | ||
+ | |||
+ | ===== wantedpages.php | ||
+ | |||
+ | Usage: wantedpages.php [wiki: | ||
+ | |||
+ | Outputs a list of wanted pages (pages which have | ||
+ | internal links but do not yet exist). | ||
+ | |||
+ | If the optional [wiki: | ||
+ | defaults to the root wiki namespace | ||
+ | |||
+ | OPTIONS | ||
+ | -h, --help get help | ||
+ | |||
+ | |||
+ | ===== striplangs.php ===== | ||
+ | |||
+ | Allows you to remove unwanted language files from an installation. | ||
+ | |||
+ | |||
+ | Usage: striplangs.php [-h [-x]] [-e] [-k lang1[, | ||
+ | |||
+ | Removes all languages from the installation, | ||
+ | after the -k option. English language is never removed! | ||
+ | |||
+ | OPTIONS | ||
+ | -h, --help | ||
+ | -x, --examples get also usage examples | ||
+ | -k, --keep | ||
+ | -e, --english | ||
+ | |||
+ | ===== gittool.php ===== | ||
+ | |||
+ | Helps with maintaining DokuWiki and plugins installed via [[devel: | ||
+ | |||
+ | <code> | ||
+ | Usage: gittool.php | ||
+ | |||
+ | Manage git repositories for DokuWiki and its plugins and templates. | ||
+ | |||
+ | EXAMPLE | ||
+ | |||
+ | $> ./bin/gittool.php clone gallery template:ach | ||
+ | $> ./bin/gittool.php repos | ||
+ | $> ./bin/gittool.php origin | ||
+ | |||
+ | COMMANDS | ||
+ | |||
+ | help | ||
+ | This help screen | ||
+ | |||
+ | clone <extensions> | ||
+ | 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 | ||
+ | </code> | ||
+ | |||
+ | ===== plugin.php ===== | ||
+ | |||
+ | This tool gives access to all installed [[devel:CLI Plugins]]. Call it without any arguments to get a list of installed plugins: | ||
+ | |||
+ | ./bin/plugin.php | ||
+ | |||
+ | Call the plugin' | ||
+ | |||
+ | | ||
+ | |||
+ | |||
+ | ====Finding more CLI plugins==== | ||
+ | Use [[plugintype>256# | ||
+ | |||
+ | A summary of plugins which indicate CLI support: | ||
+ | |||
+ | ---- pluginquery ----- | ||
+ | SELECT: name, description | ||
+ | WHERE: | ||
+ | VALUES: 255, 512, @DATEMOSTRECENT@, | ||
+ | headline: CLI plugins compatible with last two releases | ||
+ | ----- | ||
+ | |||
+ | |||
+ | To implement such a plugin please have a look at the [[devel:cli plugins|CLI plugins development documentation]]. |
cli.1327082089.txt.gz · Last modified: 2012-01-20 18:54 by 78.185.50.164