aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-07-20 17:03:24 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2013-07-20 17:03:24 +0300
commitbc20099519128f2640f57188c392039003a7a452 (patch)
tree248bad310f3f35426304d1ed3cdb86c5485ae13c
parent06f0b1494dae43fbcaaf62e606f6766847780c7c (diff)
downloadvmod-dbrw-bc20099519128f2640f57188c392039003a7a452.tar.gz
vmod-dbrw-bc20099519128f2640f57188c392039003a7a452.tar.bz2
Add auxiliary files for HTML doc genereation.
-rw-r--r--doc/.gitignore1
-rw-r--r--doc/Config368
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/gendocs_template70
4 files changed, 440 insertions, 1 deletions
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
16vmod_dbrw.tp 16vmod_dbrw.tp
17vmod_dbrw.vr 17vmod_dbrw.vr
18vmod_dbrw.t2p 18vmod_dbrw.t2p
19manual
diff --git a/doc/Config b/doc/Config
new file mode 100644
index 0000000..e8ead2f
--- /dev/null
+++ b/doc/Config
@@ -0,0 +1,368 @@
1# Texi2html configuration for Vmod-dbrw documentation. -*- perl -*-
2# Copyright (C) 2012, 2013 Sergey Poznyakoff
3#
4# Vmod-dbrw is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3, or (at your option)
7# any later version.
8#
9# Vmod-dbrw is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with Vmod-dbrw. If not, see <http://www.gnu.org/licenses/>.
16
17$top_html_dir="/software/vmod-dbrw";
18$graphics_dir="$top_html_dir/graphics";
19
20## texi2html configuration
21
22# Show TOC in place of the @contents directive.
23$INLINE_CONTENTS = 1;
24# Do not show Texinfo menus.
25$SHOW_MENU = 0;
26# Inhibit output of CSS lines in page headers.
27$CSS_LINES='';
28# Print footnotes at the end of each file (if the document is split).
29$SEPARATED_FOOTNOTES = 0;
30
31$BODYTEXT = "";
32
33$EXTRA_HEAD="\
34 <link rev=\"made\" href=\"mailto:gray@gnu.org.ua\">\
35 <link rel=\"stylesheet\" type=\"text/css\" href=\"${top_html_dir}/gray.css\">\
36 <link rel=\"stylesheet\" type=\"text/css\" href=\"${top_html_dir}/texi.css\">\
37 <link rel=\"icon\" type=\"image/png\" href=\"/graphics/gnu-head-icon.png\">";
38
39$AFTER_BODY_OPEN=qq{
40<div id="content">
41<div id="header">
42<!--#include virtual="${top_html_dir}/inc/header.html" -->
43<ul class='tabs'>
44 <li><a href="${top_html_dir}/vmod-dbrw.html">Main</a></li>
45 <li><a href="${top_html_dir}/download.html">Downloads</a></li>
46 <li><a class="active" href="${top_html_dir}/manual.html">Documentation</a></li>
47</ul>
48</div> <!-- header -->
49};
50
51$PRE_BODY_CLOSE="Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.";
52
53$format_map{'multitable'}='table class="multitable"';
54
55$SMALL_RULE = '';
56$DEFAULT_RULE = '';
57$MIDDLE_RULE = '';
58# This is output at the end of a section.
59$BIG_RULE = '';
60
61# Use navigation icons
62$ICONS = 1;
63%ACTIVE_ICONS =
64 (
65 'Top', "$graphics_dir/top.png",
66 'Contents', "$graphics_dir/ctx.png",
67 'Overview', '',
68 'Index', "$graphics_dir/idx.png",
69 'This', '',
70 'Back', "$graphics_dir/left.png",
71 'FastBack', "$graphics_dir/bwd.png",
72 'Prev', "",
73 'Up', "$graphics_dir/up.png",
74 'Next', "$graphics_dir/right.png",
75 'NodeUp', "$graphics_dir/left.png",
76 'NodeNext', "$graphics_dir/up.png",
77 'NodePrev', "$graphics_dir/right.png",
78 'Following', "$graphics_dir/right.png",
79 'Forward', "$graphics_dir/right.png",
80 'FastForward', "$graphics_dir/fwd.png",
81 'About' , '',
82 'First', '',
83 'Last', '',
84 ' ', ''
85 );
86
87@SECTION_BUTTONS =
88 (
89 \&gray_document_title,
90 \&gray_sec_ref,
91 'Back', 'Forward',
92 \&gray_chap_ref, 'FastBack', 'Up', 'FastForward',
93 \&gray_doc_ref,
94 'Contents', 'Index',
95 ' ','About',
96 );
97
98@SECTION_FOOTER_BUTTONS = @SECTION_BUTTONS;
99@NODE_FOOTER_BUTTONS = @SECTION_BUTTONS;
100
101# buttons for misc stuff
102@MISC_BUTTONS = (
103 \&gray_document_title,
104 'Contents',
105 'Index',
106 ' ',
107 'About'
108 );
109
110
111$print_section = \&gray_print_section;
112$print_navigation = \&gray_print_navigation;
113$print_head_navigation = \&gray_print_head_navigation;
114$print_foot_navigation = \&gray_print_foot_navigation;
115$print_About = \&gray_print_About;
116$cell = \&gray_multitable_cell;
117$print_page_foot = \&gray_print_page_foot;
118
119sub gray_multitable_cell($$)
120{
121 my $text = shift;
122 my $row_macro = shift;
123
124 $text =~ s/<p>//;
125 $text =~ s/<\/p>//;
126 if ($row_macro eq 'headitem')
127 {
128 return '<th>' . $text . '</th>';
129 }
130 return '<td>' . $text . '</td>';
131}
132
133sub gray_print_About
134{
135 return &$print_misc(@_) if (!($SPLIT eq '') or $SECTION_NAVIGATION);
136}
137
138sub gray_split_status()
139{
140 if ($SPLIT eq '') {
141 return '';
142 } elsif ($SPLIT eq 'node') {
143 return ' <span class="splitstatus">(split by node)</span>';
144 } elsif ($SPLIT eq 'section') {
145 return ' <span class="splitstatus">(split by section)</span>';
146 } elsif ($SPLIT eq 'chapter') {
147 return ' <span class="splitstatus">(split by chapter)</span>';
148 }
149}
150
151sub gray_document_title($$)
152{
153 my $fh = shift;
154 my $vertical = shift;
155 my $status = gray_split_status();
156 print $fh qq{<td class="title">} . $Texi2HTML::THISDOC{title} . $status . ":</td>\n";
157}
158
159sub gray_node_ref($$)
160{
161 my $fh = shift;
162 my $vertical = shift;
163 print $fh qq{<span class="navtext">Node:</span>};
164}
165
166sub gray_sec_ref($$)
167{
168 my $fh = shift;
169 my $vertical = shift;
170 print $fh qq{<span class="navtext">Section:</span>};
171}
172
173sub gray_chap_ref($$)
174{
175 my $fh = shift;
176 my $vertical = shift;
177 print $fh qq{<span class="navtext">Chapter:</span>};
178}
179
180sub gray_doc_ref($$)
181{
182 my $fh = shift;
183 my $vertical = shift;
184 print $fh qq{<span class="navtext">Doc:</span>};
185}
186
187sub gray_print_navigation
188{
189 my $fh = shift;
190 my $buttons = shift;
191 my $vertical = shift;
192 my $spacing = 1;
193 my $class="nav";
194
195 print $fh qq{<table class="nav">\n};
196
197 print $fh "<tr>" unless $vertical;
198 for my $button (@$buttons)
199 {
200 if ($button =~ /^\@class=(.*)/) {
201 $class = "$class $1";
202 next;
203 }
204 print $fh "<tr>\n" if $vertical;
205 print $fh qq{<td class="$class">};
206
207 if (ref($button) eq 'CODE')
208 {
209 &$button($fh, $vertical);
210 }
211 elsif (ref($button) eq 'SCALAR')
212 {
213 print $fh "$$button" if defined($$button);
214 }
215 elsif (ref($button) eq 'ARRAY')
216 {
217 my $text = $button->[1];
218 my $button_href = $button->[0];
219 # verify that $button_href is simple text and text is a reference
220 if (defined($button_href) and !ref($button_href)
221 and defined($text) and (ref($text) eq 'SCALAR') and defined($$text))
222 { # use given text
223 if ($Texi2HTML::HREF{$button_href})
224 {
225 print $fh "" .
226 &$anchor('',
227 $Texi2HTML::HREF{$button_href},
228 $$text
229 )
230 ;