Table of Contents

Command line tools for Dokuwiki

Dokuwiki Command Line Interface

Three CLI tools are:

Indexer

To run this do the following:

cd /var/www/sub/wiki
/usr/bin/php bin/indexer.php -c
chown -R www-data:www-data *

Explanation:

Here is a full script

#!/bin/bash
cd /var/www/sub/wiki
/usr/bin/php bin/indexer.php -c
chown -R www-data:www-data *
exit

Wanted Pages

To run this do the following:

cd /var/www/sub/wiki
/usr/bin/php bin/wantedpages.php | grep -v "some:namespaces" | grep -v "wiki:nonexisting" | grep -v "wiki:pagename"

Explanation:

Here is a full script that can be saved and run any time:

#!/bin/bash
NOW=$(date +"%Y-%m-%d-%H-%M-%S")
wpages=/tmp/blinks_${NOW}.txt
cd /var/www/sub/wiki
/usr/bin/php bin/wantedpages.php | grep -v "some:namespaces" | grep -v "wiki:nonexisting" | grep -v "wiki:pagename" > $wpages
grep -R -f $wpages data/pages/* | grep -v "\.svn"
rm $wpages

Explanation: