#!/usr/bin/php 1) { array_shift($argv); foreach($argv as $file) echo p_file_xhtml($file, false); } else { if(!isset($argv[0])) $argv[0] = __FILE__; echo "
\n"; echo "Note that you will probably need to install php-cgi package. Check if you have 'php' command on your system\n"; echo "php-cgi binary is commonly placed in /usr/bin/php\n\n"; echo "Usage examples:\n"; echo "\tphp ".$argv[0]." start\n\t\t- export single page 'start'\n"; echo "\tphp ".$argv[0]." start > start.html\n\t\t- export single page 'start' to file start.html\n"; echo "\tphp ".$argv[0]." start wiki:syntax\n\t\t- export multiple pages\n"; echo "\tphp ".$argv[0]." data/pages/start.txt\n\t\t- export single page using filename\n"; echo "\tphp ".$argv[0]." data/pages/wiki/*\n\t\t- export whole namespace 'wiki'\n"; echo "\tphp ".$argv[0]." $(find ./data/pages/wiki/)\n\t\t- export whole namespace 'wiki' and it's sub-namespaces\n"; echo "\tphp ".$argv[0]." $(find ./data/pages/) > dump.html\n\t\t- dump whole wiki to file dump.html\n"; echo "\nOnce you have HTML dump you need, you can add optional CSS styles or charset-encoding header to it,\n"; echo "then you are ready to distribute it, or (eg.) convert it to PDF using htmldoc, OpenOffice.org or html2pdf webservice.\n\n"; }