#!/usr/bin/perl
#=======================================================================
# Copyright (c) 2001 Daniele Giacomini daniele@swlibero.org
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#=======================================================================
# SimpleTable < HTML_SOURCE > HTML_SOURCE
#
#=======================================================================

# Record letto.
$riga = "";


# Inizio del programma.

# Scandisce le righe.
while ($riga = <STDIN>)
  {
    $riga =~ s/\t/ /ig;
    $riga =~ s/<BODY [^>]+>/<BODY>/ig;
    $riga =~ s/ COLS=[A-Z0-9]+//ig;
    $riga =~ s/ FRAME=[A-Z0-9]+//ig;
    $riga =~ s/ CELLSPACING=[A-Z0-9]+//ig;
    $riga =~ s/ RULES=[A-Z0-9]+//ig;
    #$riga =~ s/<TABLE [^>]+>/<TABLE BORDER=1>/ig;
    $riga =~ s/ ALIGN=[A-Z]+//ig;
    $riga =~ s/ VALIGN=[A-Z]+//ig;
    $riga =~ s/ FRAME=[A-Z]+//ig;
    #$riga =~ s/<COLGROUP>.+<\/COLGROUP>//ig;
    $riga =~ s/ WIDTH=[A-Z0-9]+//ig;
    $riga =~ s/ HEIGHT=[A-Z0-9]+//ig;

    print STDOUT ("$riga");
  }

#======================================================================

