diff options
author | Martin Mares <mj@ucw.cz> | 2003-04-06 19:35:50 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2003-04-06 19:35:50 +0000 |
commit | 9c7631235ac174ebd33a3e04e07211b3ae8501f6 (patch) | |
tree | 8b5967a04584ca369cab81f5491503fbd428f574 /doc/sbase/dist/fmt_html.pl | |
parent | a9aa5887f3b9b43d9a3a5617ef9176da936ce35f (diff) |
Updated the documentation building tools to work with a recent linuxdoc-tools package.
Note that this is (and always was) a terrible hack and we really should
replace it with something reasonable which wouldn't need changing every
time linuxdoc-tools evolve.
I also needed to include a patched version of LinuxDocTools.pm, because the
original one explicitly refused to work with a non-linuxdoc DTD. The authors
of linuxdoc recommend to use sgmltools-lite in such cases, but it would mean
rewritting our formatting rules to the DSSSL language which I don't dare to
speak about here :)
Diffstat (limited to 'doc/sbase/dist/fmt_html.pl')
-rw-r--r-- | doc/sbase/dist/fmt_html.pl | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/doc/sbase/dist/fmt_html.pl b/doc/sbase/dist/fmt_html.pl index f42e6315..b372a12b 100644 --- a/doc/sbase/dist/fmt_html.pl +++ b/doc/sbase/dist/fmt_html.pl @@ -7,17 +7,17 @@ # # © Copyright 1996, Cees de Groot # -package SGMLTools::fmt_html; +package LinuxDocTools::fmt_html; use strict; -use SGMLTools::CharEnts; -use SGMLTools::Vars; +use LinuxDocTools::CharEnts; +use LinuxDocTools::Vars; -use SGMLTools::FixRef; -my $fixref = $SGMLTools::FixRef::fixref; +use LinuxDocTools::FixRef; +my $fixref = $LinuxDocTools::FixRef::fixref; -use SGMLTools::Html2Html; -my $html2html = $SGMLTools::Html2Html::html2html; +use LinuxDocTools::Html2Html; +my $html2html = $LinuxDocTools::Html2Html::html2html; my $html = {}; $html->{NAME} = "html"; @@ -25,14 +25,22 @@ $html->{HELP} = ""; $html->{OPTIONS} = [ { option => "split", type => "l", 'values' => [ "0", "1", "2" ], short => "s" }, + { option => "toc", type => "l", + 'values' => [ "0", "1", "2" ], short => "T" }, { option => "dosnames", type => "f", short => "h" }, - { option => "imagebuttons", type => "f", short => "I"} + { option => "imagebuttons", type => "f", short => "I"}, + { option => "header", type => "s", short => "H"}, + { option => "footer", type => "s", short => "F"} ]; $html->{'split'} = 1; +$html->{'toc'} = -1; $html->{dosnames} = 0; $html->{imagebuttons} = 0; +$html->{header} = ""; +$html->{footer} = ""; $html->{preNSGMLS} = sub { $global->{NsgmlsOpts} .= " -ifmthtml "; + $global->{NsgmlsPrePipe} = "cat $global->{file}"; }; $Formats{$html->{NAME}} = $html; @@ -132,11 +140,15 @@ $html->{postASP} = sub # Run through html2html, preserving stdout # Also, handle prehtml.sed's tasks # + my $filter = ""; +# $filter = "|$main::progs->{NKF} -e" if ($global->{language} eq "ja"); open SAVEOUT, ">&STDOUT"; - open STDOUT, ">$filename.$ext" or die qq(Cannot open "$filename.$ext"); + open STDOUT, "$filter>$filename.$ext" or die qq(Cannot open "$filename.$ext"); &{$html2html->{init}}($html->{'split'}, $ext, $img, $filename, - $fixref->{filenum}, $fixref->{lrec}); + $fixref->{filenum}, $fixref->{lrec}, + $html->{'header'}, $html->{'footer'}, $html->{'toc'}, + $global->{tmpbase}, $global->{debug}); LINE: foreach (@file) { s,<P></P>,,g; # remove empty <P></P> containers foreach my $pat (keys %{$html2html->{rules}}) { |