Hello all!
I have to manage many reports, and everybody needs a report grafically
aligned with his site.
Someone don't need CSS, too.
To use HEADERFILE gives me some problems with fonts and PRE tags.
So I wrote this small Perl program to quickly replace some HTML tags into
reports.
You can change:
- horizontal rules
- font
- body parameters

Hope this helps busy webmasters!

Marco Bernardini
----------
webmaster of
http://www.taggiasca.com
the official site of
the taggiasca olive
----------



#!perl5/perl -w
# modify your path here!

use strict;

# FILES
my $mylog   = "report.html";
my $newlog  = "report2.html";

# THINGS TO CHANGE IN HTML
my $hrule   = "<HR SIZE=16 NOSHADE WIDTH=50\%>";
my $font    = "<font face=\"Verdana,Arial,Helvetica\" size=2>";
my $bgcolor = "bgcolor=\"#404050\"";
my $text    = "text=\"#FFFF80\"";
my $link    = "link=\"#0080FF\"";
my $vlink   = "vlink=\"#808000\"";
my $alink   = "alink=\"#FF8000\"";
my $backgrn = "";

##########################

open (PAGE ,"<$mylog") || die $!;
my @page = <PAGE>;
close PAGE;

my $newpage = join ("" , @page);

$newpage =~ s/\<hr\>/$hrule/ig if $hrule;

if ($font) {
$newpage =~s/<body>/<body $bgcolor $text $link $vlink $alink $backgrn>$font/i;
$newpage =~s/<pre>/<\/font><pre>/ig;
$newpage =~s/<\/pre>/<\/pre>$font/ig;
}

open (PAGE ,">$newlog") || die $!;
print PAGE $newpage;
close PAGE;

###EOF###


------------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe analog-help" in the main BODY OF THE MESSAGE.
List archived at http://www.mail-archive.com/[email protected]/
------------------------------------------------------------------------

Reply via email to