no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | tech:others:dokuwiki_cli [2014/11/15 15:13] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Command line tools for Dokuwiki ====== | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | Three CLI tools are: | ||
| + | * dwpage.php | ||
| + | * indexer.php | ||
| + | * wantedpages.php | ||
| + | |||
| + | ===== Indexer ===== | ||
| + | To run this do the following: | ||
| + | <code bash> | ||
| + | cd / | ||
| + | / | ||
| + | chown -R www-data: | ||
| + | </ | ||
| + | |||
| + | Explanation: | ||
| + | * Move to the dokuwiki root directory | ||
| + | * Run command (make sure your php is where the script says it is) | ||
| + | * The command does a clean and recreate index - which is the way I prefer | ||
| + | * Make sure the permissions on the new index files are good by changing them to the apache user | ||
| + | |||
| + | Here is a full script | ||
| + | <code bash> | ||
| + | #!/bin/bash | ||
| + | cd / | ||
| + | / | ||
| + | chown -R www-data: | ||
| + | exit | ||
| + | </ | ||
| + | |||
| + | ===== Wanted Pages ===== | ||
| + | To run this do the following: | ||
| + | <code bash> | ||
| + | cd / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Explanation: | ||
| + | * Move to the dokuwiki root directory | ||
| + | * Run the command but ignore some outputs that I know are broken links and don't care to fix | ||
| + | * If you get no output you are good to go | ||
| + | * Otherwise to find the source file that is having the issue for each line of output run this command | ||
| + | * grep -R " | ||
| + | * This will give you the source page having the broken link | ||
| + | |||
| + | Here is a full script that can be saved and run any time: | ||
| + | <code bash> | ||
| + | #!/bin/bash | ||
| + | NOW=$(date +" | ||
| + | wpages=/ | ||
| + | cd / | ||
| + | / | ||
| + | grep -R -f $wpages data/ | ||
| + | rm $wpages | ||
| + | </ | ||
| + | |||
| + | Explanation: | ||
| + | * I have a grep -v " | ||
| + | * Also this lists both the broken link and the page at which it occurs | ||