NetBSD/gnu/dist/texinfo/util/install-info-html
wiz ccaa2ac97b Import of texinfo-4.7, as prepared by texinfo2netbsd.
Changes since 4.6:

4.7 (9 April 2004)
* Language:
  . new commands @float, @caption, @shortcaption, @listoffloats for
    initial implementation of floating material (figures, tables, etc).
    Ironically, they do not yet actually float anywhere.
  . new commands @docbook, @ifdocbook, @ifnotdocbook for conditional Docbook.
  . new commands @ordf{} and @ordm{} for Spanish feminine/masculine ordinals.
  . new commands @deftypecv[x] for class variables in typed OO languages.
  . new command @registeredsymbol for the r-in-a-circle symbol.
  . new command @headitem to make a heading row in @multitable.
  . new command @LaTeX{} for the LaTeX logo.
  . new command @comma{} to avoid comma-parsing problems.
  . @url is now a synonym for @uref; new command @indicateurl has the
    old meaning of just displaying a url as text.
  . @quotation now accepts an optional argument for labelling the text
      as a `Note', `Tip', etc.
  . @defun (et al.) heading lines can now be continued with a lone @.
  . @acronym accepts an optional argument for the meaning of the acronym.
* makeinfo:
  . New environment variable TEXINFO_OUTPUT_FORMAT determines the output
    format at runtime, if no options are specified.
  . New option --plaintext, equivalent to --no-headers with Info output.
  . All outputs:
    - sections are numbered by default.
  . Info output:
    - punctuation is inserted after @pxref and @ref, if needed to make
      cross-references valid.
    - line numbers included in index menus, so Info readers can go to
      the exact line of an entry, not just a node.  Also in plaintext output.
    - ^@^H[index^@^H] cookie included in index menus, so Info readers
      can handle the ] etc. commands better.
  . HTML output:
    - new algorithm for cross-references to other manuals, for maximum
      portability and stability.
    - include node name in <title> with split output.
    - @multicolumn fractions become percentages.
    - entities used for bullets, quotes, dashes, and others.
    - index entries are links to the exact locations.
    - <h4> and <h5> used for @sub and @subsubsections again.
    - accented dotless i supported.
  . XML output: many new tags and structure to preserve more source features.
  . Docbook output:
    - upgraded DTD to Docbook XML 4.2, no longer using Docbook SGML.
    - improved translation in general, for instance:
    - line annotations and marked quotations.
* texi2dvi:
  . if available, use etex (pdfetex if --pdf) by default.
  . if the input file includes thumbpdf.sty (for LaTeX), then run thumbpdf.
  . more output if --debug.
* texinfo.tex:
  . @defun names are now printed in typewriter (instead of bold), and
    within the arguments, @var text is printed in slanted typewriter.
  . @tex code is executed inside a TeX group, so that any changes must
    be prefixed with \global (or the equivalent) to be effective.  (This
    change was actually made years ago, but never made it into the NEWS.)
* info:
  . new option --where (aka --location, -w) to report where an Info file
    would be found, instead of reading it.
  . by default, output ANSI terminal escape sequences as-is; new option
    --no-raw-escapes overrides this.
  . use the newly-generated index line numbers.
* Distribution:
  . new script gendocs.sh (not installed), for use by GNU maintainers in
    getting their manuals on the GNU web site.  Documented in
    maintain.texi (http://www.gnu.org/prep/maintain_toc.html).
  . Most code uses ANSI C prototypes, to some extent.
  . New translation: nb.
  . automake 1.8.3, autoconf 2.59, gettext 0.14.1.
2004-07-12 23:26:33 +00:00

158 lines
2.4 KiB
Plaintext

#!@BASH@
# Id: install-info-html,v 1.1.1.1 2003/12/06 01:35:48 karl Exp
name=install-info-html
version=1.0
all=
index_dir=.
#
# debugging
#
debug_echo=:
#
# print usage
#
function help ()
{
cat << EOF
$name $version
Install HTML info document.
Usage: $name [OPTION]... [DOCUMENT-DIR]...
Options:
-a,--all assume all subdirectories of index to be DOCUMENT-DIRs
-d,--dir=DIR set index directory to DIR (default=.)
-D,--debug print debugging info
-h,--help this help text
-v,--version show version
EOF
}
function cleanup ()
{
$debug_echo "cleaning ($?)..."
}
trap cleanup 0 9 15
#
# Find command line options and switches
#
# "x:" x takes argument
#
options="adhvW:"
#
# ugh, "\-" is a hack to support long options
# must be in double quotes for bash-2.0
while getopts "\-:$options" O
do
$debug_echo "O: \`$O'"
$debug_echo "arg: \`$OPTARG'"
case $O in
a)
all=yes
;;
D)
[ "$debug_echo" = "echo" ] && set -x
debug_echo=echo
;;
h)
help;
exit 0
;;
v)
echo $name $version
exit 0
;;
d)
index_dir=$OPTARG
;;
# a long option!
-)
case "$OPTARG" in
a*|-a*)
all=yes
;;
de*|-de*)
[ "$debug_echo" = "echo" ] && set -x
debug_echo=echo
;;
h*|-h*)
help;
exit 0
;;
di*|-di*)
index_dir="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
;;
version|-version)
echo $name $version
exit 0
;;
*|-*)
echo "$0: invalid option -- \"$OPTARG\""
help;
exit -1
;;
esac
esac
done
shift `expr $OPTIND - 1`
#
# Input file name
#
if [ -z "$all" ] && [ -z "$1" ]; then
help
echo "$name: No HTML documents given"
exit 2
fi
if [ -n "$all" ] && [ -n "$1" ]; then
echo "$name: --all specified, ignoring DIRECTORY-DIRs"
fi
if [ -n "$all" ]; then
document_dirs=`/bin/ls -d1 $index_dir`
else
document_dirs=$*
fi
index_file=$index_dir/index.html
rm -f $index_file
echo -n "$name: Writing index: $index_file..."
# head
cat >> $index_file <<EOF
<html>
<head><title>Info documentation index</title></head>
<body>
<h1>Info documentation index</h1>
This is the directory file \`index.html' a.k.a. \`DIR', which contains the
topmost node of the HTML Info hierarchy.
<p>
This is all very much Work in Progress (WiP).
<p>
<ul>
EOF
#list
for i in $document_dirs; do
echo "<li> <a href=\"$i/$i.html\">$i</a></li>"
done >> $index_file
# foot
cat >> $index_file <<EOF
</ul>
</body>
</html>
EOF
echo