summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-08-22 13:01:52 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-08-22 13:01:52 +0000
commit6eb9f253d7254d45e819904debe2c2efa97a5721 (patch)
tree5e6f2339729ab7748ec369a87a7902edebbefc00
parentea1e35e6b2312b8698dc3f485d428bafa2a27c61 (diff)
downloaddrakwizard-6eb9f253d7254d45e819904debe2c2efa97a5721.tar
drakwizard-6eb9f253d7254d45e819904debe2c2efa97a5721.tar.gz
drakwizard-6eb9f253d7254d45e819904debe2c2efa97a5721.tar.bz2
drakwizard-6eb9f253d7254d45e819904debe2c2efa97a5721.tar.xz
drakwizard-6eb9f253d7254d45e819904debe2c2efa97a5721.zip
wiz cleaner
-rwxr-xr-xZwiffer.pl43
1 files changed, 43 insertions, 0 deletions
diff --git a/Zwiffer.pl b/Zwiffer.pl
new file mode 100755
index 00000000..bf71add3
--- /dev/null
+++ b/Zwiffer.pl
@@ -0,0 +1,43 @@
+#!/usr/bin/perl
+
+use strict;
+
+open(wizi, "< $ARGV[0]");
+open(wizo, "> $ARGV[1]");
+my @tab;
+my $verbose = 0;
+
+while (<wizi>)
+{
+ if (/(\s*defaultImage=\".*)\..*\"/) {
+ print wizo "$1\"\n";
+ next;
+ }
+ if (/\s*guiType\s*\=.*/ || /\s*font.*\=.*/ || /\s*inputType\s*\=.*/ || /\s*dbPositions\s*\=.*/ ||
+ /\s*ratio\s*\=.*/ || /\s*proportional\s*\=.*/ || /\s*length\s*\=.*/ || /\s*alignement\s*\=.*/ ||
+ /\s*hasDb\s*\=.*/ || /\s*key\s*\=.*/ || /\s*db.*\=.*/ || /\s*reference.*\=.*/ || /\s*height\s*\=.*/ ||
+ /\s*width\s*\=.*/ || /\s*persistent\s*\=.*/) {
+ print "# $_" if $verbose;
+ next;
+ }
+ if (m/^\s*<Info/s.../^\s*<\/Info>/m ) {
+ if (!/\s*name\s*\=\".*\"\s*/) {
+ push @tab, $_;
+ print ">> $_" if $verbose;
+ }
+ next;
+ }
+ else {
+ if (@tab > 3) {
+ foreach (@tab) {
+ print "?? $_" if $verbose;
+ print wizo $_;
+ }
+ }
+ }
+ @tab = ();
+ print wizo $_;
+}
+close(wizi);
+close(wizo);
+print "$ARGV[0] -> $ARGV[1]\n";