diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 02:13:59 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 02:13:59 +0000 |
commit | a6d58bb6052ac8cb01805a48c4ad2f129126116f (patch) | |
tree | dd867a099fcbb263a8009a9fb22695b87855dad6 /src/modules/about/mkabouttext.pl | |
download | kvirc-a6d58bb6052ac8cb01805a48c4ad2f129126116f.tar.gz kvirc-a6d58bb6052ac8cb01805a48c4ad2f129126116f.zip |
Added KDE3 version of kvirc
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1095341 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/modules/about/mkabouttext.pl')
-rw-r--r-- | src/modules/about/mkabouttext.pl | 172 |
1 files changed, 172 insertions, 0 deletions
diff --git a/src/modules/about/mkabouttext.pl b/src/modules/about/mkabouttext.pl new file mode 100644 index 00000000..0b58a42c --- /dev/null +++ b/src/modules/about/mkabouttext.pl @@ -0,0 +1,172 @@ +#!/usr/bin/perl + +open(TEMPLATE,"ENTRIES") or die "Can't open the ENTRIES file"; + +$cnt = -1; + +while(<TEMPLATE>) +{ + $_ =~ s/\n//g; + $_ =~ s/</</g; + $_ =~ s/>/>/g; + + if(/^NAME:[ ]*/) + { + $_ =~ s/^NAME:[ ]*//; + $cnt++; + $g_names[$cnt]=$_; + } elsif(/^MAIL:[ ]*/) + { + $_ =~ s/^MAIL:[ ]*//; + $tmp = $g_mails[$cnt]; + if($tmp ne "") + { + $tmp = "$tmp<!!!>"; + } + $tmp = "$tmp$_"; + $g_mails[$cnt] = $tmp; + } elsif(/^ROLE:[ ]*/) + { + $_ =~ s/^ROLE:[ ]*//; + $tmp = $g_roles[$cnt]; + if($tmp ne "") + { + $tmp = "$tmp<!!!>"; + } + $tmp = "$tmp$_"; + $g_roles[$cnt] = $tmp; + } elsif(/^TEXT:[ ]*/) + { + $_ =~ s/^TEXT:[ ]*//; + $tmp = $g_texts[$cnt]; + if($tmp ne "") + { + $tmp = "$tmp<!!!>"; + } + $tmp = "$tmp$_"; + $g_texts[$cnt] = $tmp; + } elsif(/^NICK:[ ]*/) + { + $_ =~ s/^NICK:[ ]*//; + $tmp = $g_nicks[$cnt]; + if($tmp ne "") + { + $tmp = "$tmp<!!!>"; + } + $tmp = "$tmp$_"; + $g_nicks[$cnt] = $tmp; + } +} + +close(TEMPLATE); + +sub p +{ + $t = $_[0]; + $t =~ s/\"/\\\"/g; + $t =~ s/^[ ]*//g; + print OUT "\"$t\" \\\n"; +} + +open(OUT,">abouttext.inc") or die "Can't open abouttext.inc"; + +print OUT "static char * g_szAboutText = \"\" \\\n"; + +p "<html>"; +p " <head>"; +p " <title>Honor and glory</title>"; +p " </head>"; +p " <body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#FF0000\"><center>"; + + +p " <h4>"; +p "This is a partial list of the people that have "; +p "contributed in some way to the KVIrc project.<br><br>"; +p "Honor and glory to:<br>"; +p " </h4><br><br>"; + +$i = 0; +$cnt++; +while($i < $cnt) +{ + p "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">"; + p "<tr><td align=\"center\">"; + p "<font color=\"#000000\" size=\"+2\"><b>$g_names[$i]</b></font>"; + p "</td></tr>"; + + if($g_nicks[$i] ne "") + { + + p "<tr><td align=\"center\"><font color=\"#800020\" size=\"+2\"> ("; + @n = split(/<!!!>/,$g_nicks[$i]); + $j = 0; + while($n[$j] ne "") + { + if($j > 0){ p ", "; } + p $n[$j]; + $j++; + } + p ")</font></td></tr>"; + + } + + if($g_mails[$i] ne "") + { + p "<tr><td align=\"center\"><font color=\"#0000FF\" size=\"+1\">"; + @n = split(/<!!!>/,$g_mails[$i]); + $j = 0; + while($n[$j] ne "") + { + if($j > 0){ p "<br>"; } + p "["; + p $n[$j]; + p "]"; + $j++; + } + p "</font></td></tr>"; + } + + if($g_roles[$i] ne "") + { + p "<tr><td align=\"center\"><font color=\"#303030\">"; + @n = split(/<!!!>/,$g_roles[$i]); + $j = 0; + while($n[$j] ne "") + { + if($j > 0){ p "<br>"; } + p $n[$j]; + $j++; + } + p "</font></td></tr>"; + } + + if($g_texts[$i] ne "") + { + p "<tr><td align=\"center\"><font color=\"#606060\"><i>"; + @n = split(/<!!!>/,$g_texts[$i]); + $j = 0; + while($n[$j] ne "") + { + if($j > 0){ p "<br>" ; } + p "\"$n[$j]\""; + $j++; + } + p "</i></font></td></tr>"; + } + + p "</table><br><br>"; + $i++; +} + +p "<br>"; +p "This list is far from being complete.<br>"; +p "A lot of more or less \"anonymous\" people have wasted their time, "; +p "eyes, bandwidth and brain resources on this project.<br>"; +p "If you're one of those, then well, this dialog is also for you :)<br>"; + +p " </center><body>"; +p "</html>"; + +print OUT "\"\";\n"; + +close(OUT); |