diff options
author | Harald Welte <laforge@gnumonks.org> | 2015-10-25 21:00:20 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2015-10-25 21:00:20 +0100 |
commit | fca59bea770346cf1c1f9b0e00cb48a61b44a8f3 (patch) | |
tree | a2011270df48d3501892ac1a56015c8be57e8a7d /2004/netfilter-failover-ols2004/OLS2004-proceedings/bin/masterToHtml.pl |
import of old now defunct presentation slides svn repo
Diffstat (limited to '2004/netfilter-failover-ols2004/OLS2004-proceedings/bin/masterToHtml.pl')
-rwxr-xr-x | 2004/netfilter-failover-ols2004/OLS2004-proceedings/bin/masterToHtml.pl | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/2004/netfilter-failover-ols2004/OLS2004-proceedings/bin/masterToHtml.pl b/2004/netfilter-failover-ols2004/OLS2004-proceedings/bin/masterToHtml.pl new file mode 100755 index 0000000..85be495 --- /dev/null +++ b/2004/netfilter-failover-ols2004/OLS2004-proceedings/bin/masterToHtml.pl @@ -0,0 +1,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"; + |