# wiki2html.sh # Timotheus Pokorra, http://www.pokorra.de, February 2006 # use curl, because wget does not pipe the result # sed has to parse several lines, see http://www.student.northpark.edu/pemente/sed/sed1line.txt # curl and wget retrieve different html code: double quotes and single quotes # the wikistandard.css and wikiprintable.css should be copied to a subdirectory css # the file is stored with the basename + html # sample call: ". wiki2html.sh http://en.wikipedia.org/wiki/Sed" will create "Sed.html" # works with MediaWiki 1.4, probably needs other replacements for MediaWiki 1.5 and higher # also see http://mail.wikipedia.org/pipermail/mediawiki-l/2005-October/007974.html, which has a reference to wiki/maintenance/dumpHTML.php in MediaWiki 1.5 curl $1 \ | sed -e :a -e "s/
.*<\/div>//g;/.*<\/div>//g;///g;/.*<\/div>//g;//\n/g;///g;/.*<\/span>//g;///g;///g;///g;///g;/.*<\/div>//g;/ `basename $1`.html