diff options
author | Tom Feist <shabble@cowu.be> | 2010-08-22 16:13:35 +0000 |
---|---|---|
committer | Tom Feist <shabble@cowu.be> | 2010-08-22 16:13:35 +0000 |
commit | 24e48ff237a5f200ed3e36a660ee920583ab49ca (patch) | |
tree | a8ae05bed1e0a57485526e92b56e9649010edc23 /docs | |
parent | oh god stupid git. Well, also my fault for committing the wrong thing. (diff) | |
download | irssi-scripts-24e48ff237a5f200ed3e36a660ee920583ab49ca.tar.gz irssi-scripts-24e48ff237a5f200ed3e36a660ee920583ab49ca.zip |
moved some stuff into General, and started to modify buildpod.pl to render a better index page.
Diffstat (limited to '')
-rw-r--r-- | docs/General/Formats.pod (renamed from docs/Formats.pod) | 0 | ||||
-rw-r--r-- | docs/General/Guide.pod (renamed from docs/Guide.pod) | 0 | ||||
-rw-r--r-- | docs/General/Signals.pod (renamed from docs/Signals.pod) | 0 | ||||
-rw-r--r-- | docs/Irssi/UI/Theme.pod | 6 | ||||
-rwxr-xr-x | docs/buildpod.pl | 87 | ||||
-rw-r--r-- | docs/podstyle.css | 139 |
6 files changed, 222 insertions, 10 deletions
diff --git a/docs/Formats.pod b/docs/General/Formats.pod index 0aaca37..0aaca37 100644 --- a/docs/Formats.pod +++ b/docs/General/Formats.pod diff --git a/docs/Guide.pod b/docs/General/Guide.pod index 3a9f43f..3a9f43f 100644 --- a/docs/Guide.pod +++ b/docs/General/Guide.pod diff --git a/docs/Signals.pod b/docs/General/Signals.pod index f12dd7f..f12dd7f 100644 --- a/docs/Signals.pod +++ b/docs/General/Signals.pod diff --git a/docs/Irssi/UI/Theme.pod b/docs/Irssi/UI/Theme.pod index 1df1ada..323e6b3 100644 --- a/docs/Irssi/UI/Theme.pod +++ b/docs/Irssi/UI/Theme.pod @@ -8,11 +8,11 @@ Irssi::UI::Theme =head1 METHODS -=head2 C<format_expand> +=head2 C<format_expand $theme, $format, $flags> I<undocumented> -=head2 C<get_format> +=head2 C<get_format $theme, $module, $tag> I<undocumented> @@ -49,7 +49,7 @@ The actual mechanism used by Irssi to print text into the client involves a certain amount of indirection, which allows themes to reformat messages in various ways before they are displayed. - +The overall structure of these The real text formats that irssi uses are the ones you can find with /FORMAT command. Back in the old days all the colors and texts were mixed diff --git a/docs/buildpod.pl b/docs/buildpod.pl index 816b6e0..ce2b2aa 100755 --- a/docs/buildpod.pl +++ b/docs/buildpod.pl @@ -3,15 +3,88 @@ use strict; use warnings; -use Pod::Simple::HTMLBatch; -use File::Find; +package Pod::Simple::HTMLBatch::Custom; +use base qw/Pod::Simple::HTMLBatch/; + +use vars qw/$VERSION/; + +$VERSION = '0.01'; +sub esc { + return Pod::Simple::HTMLBatch::esc(@_); +} + +sub new { + print "Hello!\n"; + my $self = shift; + my $obj = $self->SUPER::new(@_); + + $obj->add_css('podstyle.css', 1); + $obj->css_flurry(0); + $obj->javascript_flurry(0); + + + my @index_header = ("<html>\n", + "<head>\n", + "<title>Irssi Scripting Documentation</title>\n", + "</head><body class='contentspage'>\n", + "<h1>Irssi Scripting Documentation</h1>\n", + ); + + $obj->contents_page_start(join("", @index_header)); + + + my $index_footer = sprintf("\n\n<p class='contentsfooty'>Generated " + . "by %s v%s under Perl v%s\n<br >At %s GMT" + . ", which is %s local time.</p>\n\n</body></html>\n", + esc(ref($obj), $VERSION, + $], scalar(gmtime), scalar(localtime))); + + + my @copyright = ( + "<p><small>Much of the content on these pages is taken", + " from original Irssi documentation, and is Copyright", + " © 2000-2010 The Irssi project.<br/>", + " Formatting and additional documentation by Tom Feist", + " <code>shabble+irssi\@metavore.org</code>", + "</small></p>"); + + $obj->contents_page_end($index_footer . join("", @copyright)); + + return $obj; +} + + + +sub _write_contents_middle { + my($self, $Contents, $outfile, $toplevel2submodules, $toplevel_form_freq) = @_; + + foreach my $t (sort keys %$toplevel2submodules) { + my @downlines = sort {$a->[-1] cmp $b->[-1]} + @{ $toplevel2submodules->{$t} }; + + printf $Contents qq[<dt><a name="%s">%s</a></dt>\n<dd>\n], + esc( $t, $toplevel_form_freq->{$t} ) ; + + my($path, $name); + foreach my $e (@downlines) { + $name = $e->[0]; + $path = join( "/", '.', esc( @{$e->[3]} ) ) + . ($POD::Simple::HTMLBatch::HTML_EXTENSION + || $Pod::Simple::HTML::HTML_EXTENSION); + print $Contents qq{ <a href="$path">}, esc($name), "</a><br/>\n"; + } + print $Contents "</dd>\n\n"; + } + return 1; +} + +1; + +package main; my $output_dir = "../../tmp/shab-irssi-scripts/docs/"; -my $batchconv = Pod::Simple::HTMLBatch->new; -$batchconv->add_css('podstyle.css', 1); -$batchconv->css_flurry(0); -$batchconv->javascript_flurry(0); +my $batchconv = Pod::Simple::HTMLBatch::Custom->new; -$batchconv->batch_convert( [qw/./], $output_dir ); +$batchconv->batch_convert([qw/./], $output_dir); diff --git a/docs/podstyle.css b/docs/podstyle.css new file mode 100644 index 0000000..79dbc1d --- /dev/null +++ b/docs/podstyle.css @@ -0,0 +1,139 @@ +/* This file is autogenerated. Do not edit. 110n=black_with_blue_on_white */ + +/* For accessibility reasons, never specify text sizes in px/pt/pc/in/cm/mm */ + +@media all { .hide { display: none; } } + +@media print { + .noprint, div.indexgroup, .backlinktop, .backlinkbottom { display: none } + + * { + border-color: black !important; + color: black !important; + background-color: transparent !important; + background-image: none !important; + } + + dl.superindex > dd { + word-spacing: .6em; + } +} + +@media aural, braille, embossed { + div.indexgroup { display: none; } /* Too noisy, don't you think? */ + dl.superindex > dt:before { content: "Group "; } + dl.superindex > dt:after { content: " contains:"; } + .backlinktop a:before { content: "Back to contents"; } + .backlinkbottom a:before { content: "Back to contents"; } +} + +@media aural { + dl.superindex > dt { pause-before: 600ms; } +} + +@media screen, tty, tv, projection { + .noscreen { display: none; } + + a:link { color: #7070ff; text-decoration: underline; } + a:visited { color: #e030ff; text-decoration: underline; } + a:active { color: #800000; text-decoration: underline; } + body.contentspage a { text-decoration: none; } + a.u { color: #000 !important; text-decoration: none; } + + body.pod { + margin: 0 5px; + color: #000; + background-color: #fff; + } + + .pod pre { + background: #eeeeee; + border: 1px solid #888888; + color: black; + padding: 1em; + white-space: pre; + } + + body.pod h1, body.pod h2, body.pod h3, body.pod h4 { + font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; + font-weight: normal; + margin-top: 1.2em; + margin-bottom: .1em; + border-top: medium solid transparent; + /* margin-left: -5px; border-left: 2px #7070ff solid; padding-left: 3px; */ + } + + body.pod h1 { border-top-color: #55f; } + body.pod h2 { border-top-color: #77f; } + body.pod h3 { border-top-color: #bbf; } + body.pod h4 { border-top-color: #eef; } + + p.backlinktop + h1 { border-top: none; margin-top: 0em; } + p.backlinktop + h2 { border-top: none; margin-top: 0em; } + p.backlinktop + h3 { border-top: none; margin-top: 0em; } + p.backlinktop + h4 { border-top: none; margin-top: 0em; } + + body.pod dt { + font-size: 105%; /* just a wee bit more than normal */ + } + + .indexgroup { font-size: 80%; } + + .backlinktop, .backlinkbottom { + margin-left: -5px; + margin-right: -5px; + background-color: #bbf; + border-top: medium solid #aaf; + border-bottom: medium solid #aaf; + } + + .backlinktop a, .backlinkbottom a { + text-decoration: none; + color: #77f; + background-color: #fff; + border: medium solid #22f; + } + .backlinkbottom { margin-bottom: 0; padding-bottom: 0; } + .backlinktop { margin-top: 0; padding-top: 0; } + + body.contentspage { + color: #000; + background-color: #fff; + } + + body.contentspage h1 { + color: #22f; + margin-left: 1em; + margin-right: 1em; + text-indent: -.9em; + font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; + font-weight: normal; + border-top: medium solid #000; + border-bottom: medium solid #000; + text-align: center; + } + + dl.superindex > dt { + font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; + font-weight: normal; + font-size: 90%; + margin-top: .45em; + /* margin-bottom: -.15em; */ + } + dl.superindex > dd { + word-spacing: .6em; /* most important rule here! */ + } + dl.superindex > a:link { + text-decoration: none; + color: #000; + } + + .contentsfooty { + border-top: medium solid #666; + font-size: 90%; + } + +} + +/* The End */ + |