mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 04:19:27 +01:00
Add table of contents to factoids html export
This commit is contained in:
parent
37dca64465
commit
02ebf106a8
@ -119,13 +119,20 @@ sub export_factoids {
|
||||
print FILE '<script type="text/javascript" src="js/jquery-latest.js"></script>' . "\n";
|
||||
print FILE '<script type="text/javascript" src="js/jquery.tablesorter.js"></script>' . "\n";
|
||||
print FILE "</head>\n<body><i>Last updated at $time</i>\n";
|
||||
print FILE "<hr><h2>Candide's factoids</h2>\n";
|
||||
print FILE "<hr><h2>Candide's factoids</h2>\n<hr>\n";
|
||||
|
||||
my $i = 0;
|
||||
my $table_id = 1;
|
||||
|
||||
foreach my $channel (sort keys %{ $self->factoids->hash }) {
|
||||
my $chan = $channel eq '.*' ? 'Global channel' : "Channel $channel";
|
||||
my $chan = $channel eq '.*' ? 'global' : $channel;
|
||||
|
||||
print FILE "<a href='#" . $chan . "'>$chan</a><br>\n";
|
||||
}
|
||||
|
||||
foreach my $channel (sort keys %{ $self->factoids->hash }) {
|
||||
my $chan = $channel eq '.*' ? 'global' : $channel;
|
||||
print FILE "<a name='$chan'></a>\n";
|
||||
print FILE "<hr>\n<h3>$chan</h3>\n<hr>\n";
|
||||
print FILE "<table border=\"0\" id=\"table$table_id\" class=\"tablesorter\">\n";
|
||||
print FILE "<thead>\n<tr>\n";
|
||||
|
@ -13,7 +13,7 @@ use warnings;
|
||||
# These are set automatically by the build/commit script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 444,
|
||||
BUILD_REVISION => 445,
|
||||
BUILD_DATE => "2013-10-12",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user