blob: 85be495c3792813c7407a0ff4847b24c9c8d7775 (
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
|
#!/usr/bin/perl
# An abject hack, but produces something that can be tidied up by hand.
$in = 0;
print "<html>\n<title></title>\n<body>\n<table>";
while (defined($ln = <STDIN>)) {
chomp $ln;
next if ($ln =~ /^\s*$/);
next if ($ln =~ /^\s*%/);
if ($ln =~ /coltocauthor{(.*?)}/) {
$foo = $1;
$foo =~ s/\\//g;
print "<tr>\n <td>$foo</td>\n";
$in = 1;
}
if ($ln =~ /coltoctitle{(.*?)}/) {
$title = $1;
}
if ($ln =~ /import{(.*)}/) {
$fyle = $1;
if ($fyle ne 'missing') {
print " <td><a href=\"${fyle}.pdf\">${title}</a></td>\n</tr>\n";
} else {
print " <td>${title}</td>\n</tr>\n";
}
$in = 0;
}
}
print "</table>\n</body>\n</html>\n";
|