summaryrefslogtreecommitdiffstats
path: root/src/modules/about/mkabouttext.pl
blob: 0b58a42cfe790cca37bbb2388915ebf16aab7910 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#!/usr/bin/perl

open(TEMPLATE,"ENTRIES") or die "Can't open the ENTRIES file";

$cnt = -1;

while(<TEMPLATE>)
{
	$_ =~ s/\n//g;
	$_ =~ s/</&lt;/g;
	$_ =~ s/>/&gt;/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);