PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/doc/English/userguide/htmlgen

http://txt2tags.googlecode.com/
#! | 32 lines | 23 code | 9 blank | 0 comment | 0 complexity | e12a210471a83650c5939f3939e1bd54 MD5 | raw file
 1#!/bin/bash
 2
 3# This script generates the HTML version of the User Guide
 4# for the txt2tags website.
 5
 6cd $(dirname "$0")
 7
 8outdir="../../../website/userguide/"
 9
10# Regenerate HTML version (if needed)
11test userguide.t2t -nt userguide.html && txt2tags userguide.t2t
12
13# HTMLDOC splits the one-big-HTML-file to lots of tiny HTML files
14htmldoc --book --no-title \
15	--toclevels 2 --toctitle "Txt2tags User Guide" \
16	-t htmlsep \
17	-d "$outdir" \
18	userguide.html
19
20cd "$outdir" || { echo "Can't find $outdir, aborting." ; exit 1; }
21
22# Append CSS file call to the HEAD of each HTML file
23for file in *.html
24do
25	cp "$file" tmp
26	sed 's|</HEAD>|<LINK REL="stylesheet" TYPE="text/css" HREF="userguide.css"></HEAD>|' tmp > "$file"
27done
28rm tmp
29
30
31echo "User Guide generated at $outdir"
32exit 0