From bc20099519128f2640f57188c392039003a7a452 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sat, 20 Jul 2013 17:03:24 +0300 Subject: Add auxiliary files for HTML doc genereation. --- doc/.gitignore | 1 + doc/Config | 368 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/Makefile.am | 2 +- doc/gendocs_template | 70 ++++++++++ 4 files changed, 440 insertions(+), 1 deletion(-) create mode 100644 doc/Config create mode 100644 doc/gendocs_template diff --git a/doc/.gitignore b/doc/.gitignore index bc49935..4e23977 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -16,3 +16,4 @@ vmod_dbrw.toc vmod_dbrw.tp vmod_dbrw.vr vmod_dbrw.t2p +manual diff --git a/doc/Config b/doc/Config new file mode 100644 index 0000000..e8ead2f --- /dev/null +++ b/doc/Config @@ -0,0 +1,368 @@ +# Texi2html configuration for Vmod-dbrw documentation. -*- perl -*- +# Copyright (C) 2012, 2013 Sergey Poznyakoff +# +# Vmod-dbrw is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# Vmod-dbrw is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Vmod-dbrw. If not, see . + +$top_html_dir="/software/vmod-dbrw"; +$graphics_dir="$top_html_dir/graphics"; + +## texi2html configuration + +# Show TOC in place of the @contents directive. +$INLINE_CONTENTS = 1; +# Do not show Texinfo menus. +$SHOW_MENU = 0; +# Inhibit output of CSS lines in page headers. +$CSS_LINES=''; +# Print footnotes at the end of each file (if the document is split). +$SEPARATED_FOOTNOTES = 0; + +$BODYTEXT = ""; + +$EXTRA_HEAD="\ + \ + \ + \ + "; + +$AFTER_BODY_OPEN=qq{ +
+ +}; + +$PRE_BODY_CLOSE="Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved."; + +$format_map{'multitable'}='table class="multitable"'; + +$SMALL_RULE = ''; +$DEFAULT_RULE = ''; +$MIDDLE_RULE = ''; +# This is output at the end of a section. +$BIG_RULE = ''; + +# Use navigation icons +$ICONS = 1; +%ACTIVE_ICONS = + ( + 'Top', "$graphics_dir/top.png", + 'Contents', "$graphics_dir/ctx.png", + 'Overview', '', + 'Index', "$graphics_dir/idx.png", + 'This', '', + 'Back', "$graphics_dir/left.png", + 'FastBack', "$graphics_dir/bwd.png", + 'Prev', "", + 'Up', "$graphics_dir/up.png", + 'Next', "$graphics_dir/right.png", + 'NodeUp', "$graphics_dir/left.png", + 'NodeNext', "$graphics_dir/up.png", + 'NodePrev', "$graphics_dir/right.png", + 'Following', "$graphics_dir/right.png", + 'Forward', "$graphics_dir/right.png", + 'FastForward', "$graphics_dir/fwd.png", + 'About' , '', + 'First', '', + 'Last', '', + ' ', '' + ); + +@SECTION_BUTTONS = + ( + \&gray_document_title, + \&gray_sec_ref, + 'Back', 'Forward', + \&gray_chap_ref, 'FastBack', 'Up', 'FastForward', + \&gray_doc_ref, + 'Contents', 'Index', + ' ','About', + ); + +@SECTION_FOOTER_BUTTONS = @SECTION_BUTTONS; +@NODE_FOOTER_BUTTONS = @SECTION_BUTTONS; + +# buttons for misc stuff +@MISC_BUTTONS = ( + \&gray_document_title, + 'Contents', + 'Index', + ' ', + 'About' + ); + + +$print_section = \&gray_print_section; +$print_navigation = \&gray_print_navigation; +$print_head_navigation = \&gray_print_head_navigation; +$print_foot_navigation = \&gray_print_foot_navigation; +$print_About = \&gray_print_About; +$cell = \&gray_multitable_cell; +$print_page_foot = \&gray_print_page_foot; + +sub gray_multitable_cell($$) +{ + my $text = shift; + my $row_macro = shift; + + $text =~ s/

//; + $text =~ s/<\/p>//; + if ($row_macro eq 'headitem') + { + return '' . $text . ''; + } + return '' . $text . ''; +} + +sub gray_print_About +{ + return &$print_misc(@_) if (!($SPLIT eq '') or $SECTION_NAVIGATION); +} + +sub gray_split_status() +{ + if ($SPLIT eq '') { + return ''; + } elsif ($SPLIT eq 'node') { + return ' (split by node)'; + } elsif ($SPLIT eq 'section') { + return ' (split by section)'; + } elsif ($SPLIT eq 'chapter') { + return ' (split by chapter)'; + } +} + +sub gray_document_title($$) +{ + my $fh = shift; + my $vertical = shift; + my $status = gray_split_status(); + print $fh qq{} . $Texi2HTML::THISDOC{title} . $status . ":\n"; +} + +sub gray_node_ref($$) +{ + my $fh = shift; + my $vertical = shift; + print $fh qq{Node:}; +} + +sub gray_sec_ref($$) +{ + my $fh = shift; + my $vertical = shift; + print $fh qq{Section:}; +} + +sub gray_chap_ref($$) +{ + my $fh = shift; + my $vertical = shift; + print $fh qq{Chapter:}; +} + +sub gray_doc_ref($$) +{ + my $fh = shift; + my $vertical = shift; + print $fh qq{Doc:}; +} + +sub gray_print_navigation +{ + my $fh = shift; + my $buttons = shift; + my $vertical = shift; + my $spacing = 1; + my $class="nav"; + + print $fh qq{\n}; + + print $fh "" unless $vertical; + for my $button (@$buttons) + { + if ($button =~ /^\@class=(.*)/) { + $class = "$class $1"; + next; + } + print $fh "\n" if $vertical; + print $fh qq{\n"; + print $fh "\n" if $vertical; + $class = "nav"; + } + print $fh "" unless $vertical; + print $fh "\n"; +} + +sub gray_print_head_navigation($$) +{ + my $fh = shift; + my $buttons = shift; + + return if ($SPLIT eq ''); + if ($VERTICAL_HEAD_NAVIGATION) + { + print $fh < + + +EOT + } + main::print_lines($fh, $Texi2HTML::THIS_HEADER); + &$print_navigation($fh, $buttons, $VERTICAL_HEAD_NAVIGATION); + if ($VERTICAL_HEAD_NAVIGATION) + { + print $fh < + +EOT + } +} + +sub gray_print_foot_navigation +{ + my $fh = shift; + + return if ($SPLIT eq ''); + if ($VERTICAL_HEAD_NAVIGATION) + { + print $fh < + + +EOT + } +} + +sub gray_print_page_foot($) +{ + my $fh = shift; + my $program_string = program_string(); + print $fh < +$program_string +EOT + if (defined($PRE_BODY_CLOSE) && $PRE_BODY_CLOSE) { + print $fh "

$PRE_BODY_CLOSE

"; + } + print $fh < +
+ + +EOT +} + +sub gray_print_section +{ + my $fh = shift; + my $first_in_page = shift; + my $previous_is_top = shift; + my $buttons = \@SECTION_BUTTONS; + + if ($first_in_page) { + &$print_head_navigation($fh, $buttons) + } else { + main::print_lines($fh, $Texi2HTML::THIS_HEADER); + } + my $nw = main::print_lines($fh); + if (defined $SPLIT + and ($SPLIT eq 'node')) { + &$print_foot_navigation($fh); + print $fh "$SMALL_RULE\n"; + &$print_navigation($fh, \@NODE_FOOTER_BUTTONS) if (!defined($WORDS_IN_PAGE) or (defined ($nw) + and $nw >= $WORDS_IN_PAGE)); + } +} diff --git a/doc/Makefile.am b/doc/Makefile.am index efa415b..9e03e8a 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -19,7 +19,7 @@ manual: MAKEINFO="$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)" \ TEXI2DVI="$(TEXI2DVI) -t @finalout" \ TEXI2HTML="texi2html $(AM_MAKEINFOFLAGS)" \ - $(GENDOCS) --texi2html $(PACKAGE) '$(PACKAGE_NAME) manual' + $(GENDOCS) --texi2html vmod_dbrw 'Vmod_dbrw manual' manual.tar.bz2: manual diff --git a/doc/gendocs_template b/doc/gendocs_template new file mode 100644 index 0000000..45b12a1 --- /dev/null +++ b/doc/gendocs_template @@ -0,0 +1,70 @@ + + + + +
+

The manual for %%PACKAGE%% is available in the following formats:

+ + + +
+ +
+

(This page is generated by the %%SCRIPTNAME%% script.) +

+
+ + + + -- cgit v1.2.1