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