#!/usr/bin/perl # Given a directory containing a set of downloaded wiki HTML topics files, # clean up the HTML code in each file and save the page into a new directory. # By default, the "Html" directory is searched for HTML files, with new files # stored in "NewHtml". # # (c) 2008 Warren Toomey wkt@tuhs.org, under the GPL3 license. # use strict; use warnings; my $olddir = "Html"; my $newdir = "NewHtml"; my $newimg = "NewImages"; my $noimages = 0; my $nohrefs = 0; # Given a web page as a list of lines, clean it up and fix images sub CleanHtml { my ( $IN, $OUT ) = @_; # Loop for lines before the initial