[dokuwiki] Re: Changelog rewrite

  • From: "Bill Jones" <tetragondzein@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 1 Aug 2006 00:10:03 -0400

On 7/31/06, Syv Ritch <elfroggio@xxxxxxxxx> wrote:

Would you consider sharing them with us?

Sure. The main two are plain shell scripts, not Perl per-se; the Perl stuff I am hesitant to share for various reasons -- mostly because after having looked at them I'm not sure I want to clean them up for public use. Suffice to say they mostly perform site management I cannot figure out (yet) how to do in PHP -- and prolly not very clean. Perl can definitely be a down and dirty language.

This script I got off the Dokuwiki site itself and I run it via cron daily:

rm -fR dw/_test
find ~/dw_data/attic/ -type f -mtime +11 -exec rm -f {} \;
find ~/dw_data/pages/ -name '*.lock' -type f -mtime +1 -exec rm -f {} \;
find ~/dw_data/pages/ -depth -type d -empty -exec rmdir {} \;


This script I wrote myself and I run it via cron weekly -

#!/usr/bin/bash
echo "Content-type: text/plain" ; echo ; echo ;
echo "<pre>Getting DokuWiki..." ; echo " " ;
cd ~/public_html
wget http://dev.splitbrain.org/download/snapshots/dokuwiki-latest.tgz
tar zxvf dokuwiki-latest.tgz
echo " " ; echo " ...cleaning house... " ; echo " " ;
rm -fR dw/_test
rm -fR dw/install.php
# purge files older than 11 days from the attic
find ~/dw_data/attic/ -type f -mtime +11 -exec rm -f {} \;
# remove stale lock files
find ~/dw_data/pages/ -name '*.lock' -type f -mtime +1 -exec rm -f {} \;
# remove empty directories
find ~/dw_data/pages/ -depth -type d -empty -exec rmdir {} \;
# remove all the foreign language content
#cd dw/inc/lang/ ; perl delList.perl
#cd dw/lib/plugins/plugin/lang ; perl delList.perl
#cd dw/lib/plugins/usermanager/lang ; perl delList.perl
#cd dw/lib/plugins/config/lang ; perl delList.perl
#cd dw/lib/plugins/acl/lang ; perl delList.perl
rm dokuwiki-latest.tgz
echo " " ; pwd ; echo "... Done!</pre>" ;

The "html" is in there to make it all look pretty for the mailer...
--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: