#! /bin/sh # Copyright (c) 2001 SuSE GmbH Nuernberg, Germany. All rights reserved. # # Author: Adrian Schroeter # # This module generates a index.html page for all KDE main api index.html pages # SuSEhelp will use this index.html page as start point r=`pwd` while test ! -x usr/share/doc/KDE3-API/ && test "$r" != "/"; do r=`dirname $root` cd .. done kdeapi=/usr/share/doc/KDE3-API/ if test ! -w $r/${kdeapi} ; then echo "The KDE API directory $kdeapi is not writeable. Exit..." exit 1 fi # # write html header # cat > $r/${kdeapi}/index.html < KDE API Reference

KDE 3.x API Reference

EOF # # list all the api start pages # cat >> $r/${kdeapi}/index.html <  Descriptionfrom package Qt all Qt classes qt EOF dark=1 mods= list=`ls -1 $r/${kdeapi}/*/index.html 2> /dev/null` for page in $list; do mainapi=`echo $page | sed -n -e "s@$r/$kdeapi/\([^/]*\)/index.html@\1@p"` mods="$mods $mainapi" eval "page_$mainapi=$page" eval "path_$mainapi=/$kdeapi/$mainapi" done list=`ls -1 $r/opt/kde3/share/doc/HTML/en/*-apidocs/*/html/index.html 2> /dev/null` for page in $list; do mainapi=`echo $page | sed -n -e "s@$r/opt/kde3/share/doc/HTML/en/.*-apidocs/\([^/]*\)/html/index.html@\1@p"` mods="$mods $mainapi" path=`echo $page | sed -e "s,$r/opt,/opt,"` eval "page_$mainapi=$path" path=`echo $page | sed -n -e "s@$r\(/opt/kde3/share/doc/HTML/en/.*-apidocs/[^/]*\)/html/index.html@\1@p"` eval "path_$mainapi=$path" done mods=`(for i in $mods; do echo $i; done ) | sort` for mod in $mods; do eval "apipath=$""page_$mod" eval "basepath=$""path_$mod" description="`cat $r/$basepath/description.SuSE`" package="`cat $r/$basepath/package.SuSE`" if [ "$dark" == "1" ]; then dark=0 echo "" >> $r/${kdeapi}/index.html else dark=1 echo "" >> $r/${kdeapi}/index.html fi echo " ${mod} " >> $r/${kdeapi}/index.html echo "${description}" >> $r/${kdeapi}/index.html echo "${package}" >> $r/${kdeapi}/index.html echo "" >> $r/${kdeapi}/index.html done # # finish it ... # cat >> $r/${kdeapi}/index.html <
generated by create-kdeapi on `date`
EOF