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

Seamless Local Control: Integrating WeatherFlow with Home Assistant Across VLANs

I've been pleased with my Home Assistant setup for some time now. One of my main focuses has been achieving local control. This ensures...