towo
persona non grata
Code:
#!/usr/bin/perl
my @color = qw/FFFFFF 444444/;
while (<>) {
chomp;
print("<td style=\"background-color: \#$color[$i]\"><a href=\"path/to/profile/$_.html\">$_</a></td>\n");
if ($i == 1) { $i = 0 } else { $i = 1 };
}
Alternates the given names (one per line, either via piping to program or reading from a file in argument list), constantly switching between @color for the background colors to use.
example:
Code:
$ echo -e 'Alpha\nBeta\nGamma' | temp.pl
<td style="background-color: #FFFFFF"><a href="path/to/profile/Alpha.html">Alpha</a></td>
<td style="background-color: #444444"><a href="path/to/profile/Beta.html">Beta</a></td>
<td style="background-color: #FFFFFF"><a href="path/to/profile/Gamma.html">Gamma</a></td>
Customize to your needs.
-towo