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

Revolutionizing Air Quality Monitoring: How I Upgraded Our System with Mila Integration for Smart Home Automation

In this blog post , I explained how I set up an air quality monitoring system for our neighborhood. With this setup, we can keep an eye on t...