|
Cookbook /
AdminByShellSummary: A collection of ways to assist sysadmin of pmwiki using shell tools
Version:
Prerequisites:
Status:
Maintainer: Peter Bowers
Categories: SystemTools Searching
Questions answered by this recipeHow can I use linux shell tools to examine, search, and otherwise process PMWiki pages? DescriptionVarious ways to use linux shell tools to process wiki pages NotesRunning arbitrary shell commands on pages (security based on root-controlled /usr/local/bin location of scripts): Finding a list of all categories:
WIKID_DIR=/var/www/html/pmwiki/wiki.d
TEXTDIR=/var/www/html/pmwiki/export
cd "$WIKID_DIR"
for i in "$@"
do
grep '^text=' "$i" | sed -e 's/^text=//' -e 's/%0a/\n/g' -e 's/%25/%/g' >${TEXTDIR}/${i}.txt
done
Converting wiki pages to text files for external processing: Converting from text files back to wiki pages: Converting from text files back to wiki pages without the Import (assuming existing pages): Release Notes
See AlsoPageFileFormat (includes an alternate shell script to access text from command line) ContributorsSeveral of the code examples come from Chris Cox thru pmwiki-users posts. See related links to those posts. Comments |