Tuesday, October 10, 2006

converting html to wiki


I am used to writing html documents, but now it seems that everything is done with wikis.  So I needed to figure out how to convert html documents to use wiki markup.


The HTML::WikiConverter perl module makes this conversion very easy.  This simple program outputs text with wiki tags from an html file:




#!/usr/bin/perl -w
use HTML::WikiConverter;
my $wc = new HTML::WikiConverter( dialect => 'MoinMoin' );
# Or fetch it from a file
print $wc->html2wiki( file => "file.html" );

No comments:

Post a Comment

Unlocking Raspberry Pi Potential: Navigating Network Booting Challenges for Enhanced Performance and Reliability

I've set up several Raspberry Pis around our house for various projects, but one recurring challenge is the potential for SD card failur...