From: Reini U. <ru...@x-...> - 2001-09-23 12:30:45
|
Malcolm Ryan schrieb: > I have a whole bunch of web pages that I would like to turn into a > wiki. I would like to keep as much of the existing formatting as I can, > but it is far too much work to do this by hand. Has anyone written an > HTML-to-Wiki converter? > > I have started writing one of my own in Perl using the HTML::Parser > module. I have put together a quick-and-dirty version which I am slowly > refining. I'd be glad to share it around if nothing better already > exists. yes, please. I've also made my own, based on HTML::Parse and HTML::Formatter also, using the HTML::FormatterPhpwiki namespace. But I don't think that mine is good enough because I didn't use it that much so far. oops, and I cannot find this module anymore. > One question: what do I do with the files once I have converted them? > Is there an easy way to add pages to a wiki from the command line (under > UNIX), rather than through the web? two options: * plain text wiki files in the pgsrc dir can be used to initialise the database (if frontpage is undefined in the db) this is what I did. * convert them to the pseudo mail format the dumps are using. you just have to process the body through MIME::QuotedPrint, like cat $body | perl -MMIME::QuotedPrint -0777 -ne 'print encode_qp($_)' > $newbody you can also zip them then. please post your script to the list. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |