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

Mastering Matter: Seamless Smart Home Integration with Network Segmentation

I’ve been intrigued by the idea of integrating devices with Matter for some time. My smart home setup includes a pair of SwitchBot Hubs, som...