#!/bin/sh processline() { echo "- $1 -" name="$1" anchors="" title="" stylesheet="../style/xaoshelp.css" shift while [ "$1" != "" ] ; do if [ "$1" != "$name" ] ; then anchors="$anchors " fi shift done if [ "$name" == "main" ]; then title='' stylesheet="style/xaoshelp.css" fi # I changed "0" to "$" because my sed # doesn't want to understand "0". # -- Zoltan cat xaos.hlp | sed '/%'"$name"'/H' | sed '1,/%'"$name"'/d;/^%/,$ d' | sed \ '1,3s_\([^<]*\)_\ \ \ \ \1\ '"$title"'\ \ \ \ '"$anchors"'\

\1

\ _g s__

_g s__

_g s_
__g s_
__g s___g s___g s___g s___g s___g s_
__g s___g s___g s___g s___g s___g s___g s___g s___g s_]*\)>__g s___g s_]*\)>__g s/'\'\''/"/g s/``/"/g' > $name.html echo "" >> $name.html tidy -qm $name.html case $name in main) mv $name.html XaoSHelp/XaoSHelp.html;; *) mv $name.html XaoSHelp/pages;; esac } process() { while read line ; do eval "processline $line" done } rm -rf XaoSHelp mkdir -p XaoSHelp/{images,pages,scripts,style} cp tutorial.scpt XaoSHelp/scripts cp xaoshelp.css XaoSHelp/style grep "^%" xaos.hlp | sed '/%%/d;s/%//g' | process /Developer/Applications/Utilities/Help\ Indexer.app/Contents/MacOS/Help\ Indexer "XaoSHelp" -PantherIndexing YES -IndexAnchors YES -TigerIndexing YES