Quote:
Originally Posted by stuart_cherrington
html2wiki does what it says on the tin. Takes an HTML webpage and converts into Wiki markup. SHould be that simple.
Have you tried any?
|
Yes I have, and it turn out to be that simple. I tested a couple then wrote a script and presto.
Code:
#! /bin/bash
## Step thru the entire website directoris
## converting HTML files to wiki files
for filename in *.html *.htm;
do
if [ -f "$filename" ]
then
wikifilename=${filename%.*}
/usr/bin/html2wiki --dialect "Kwiki" --encoding iso-8859-1 --base-uri "http://en.wikipedia.org/wiki/" --wiki-uri "http://en.wikipedia.org/wiki/" $filename > $wikifilename.wiki
else
:
fi
done
exit;
One of the things I encountered that I don't understand is '--dialect'. The example uses 'MediaWiki'. I don't have that and could not find it. And I could not find a definition of the differences. So I picked one at random.
After I got this done, I ask myself what to do with all these converted files. All the online manuals seem to be about configuration et al.
Is there a read somewhere that will take me through those steps?
Thanks for your feedback.
Dave