summaryrefslogtreecommitdiffstats
path: root/opensuse/core/tdelibs/create-kdeapi
diff options
context:
space:
mode:
authorRobert Xu <robxu9@gmail.com>2011-11-10 18:04:39 -0500
committerRobert Xu <robxu9@gmail.com>2011-11-10 18:04:39 -0500
commit21fcfa3348213aa87f0e3aef62ca4720c6d31cb7 (patch)
tree2cfb64c59322628e613ed0895e3c3694d3abe6bd /opensuse/core/tdelibs/create-kdeapi
parent8667643bff14a60d8571c599efd3e48bed3e3b12 (diff)
downloadtde-packaging-21fcfa3348213aa87f0e3aef62ca4720c6d31cb7.tar.gz
tde-packaging-21fcfa3348213aa87f0e3aef62ca4720c6d31cb7.zip
initial commit to suse branch: eclipse integration
Diffstat (limited to 'opensuse/core/tdelibs/create-kdeapi')
-rw-r--r--opensuse/core/tdelibs/create-kdeapi107
1 files changed, 107 insertions, 0 deletions
diff --git a/opensuse/core/tdelibs/create-kdeapi b/opensuse/core/tdelibs/create-kdeapi
new file mode 100644
index 000000000..6a11907eb
--- /dev/null
+++ b/opensuse/core/tdelibs/create-kdeapi
@@ -0,0 +1,107 @@
+#! /bin/sh
+# Copyright (c) 2001 SuSE GmbH Nuernberg, Germany. All rights reserved.
+#
+# Author: Adrian Schroeter <adrian@suse.de>
+#
+# 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/TDE-API/ && test "$r" != "/"; do
+ r=`dirname $root`
+ cd ..
+done
+
+kdeapi=/usr/share/doc/TDE-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 <<EOF
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="Author" content="kde-maintainers@suse.de">
+ <meta name="GENERATOR" content="create-kdeapi">
+ <title>KDE API Reference</title>
+</head>
+
+<body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000">
+ <CENTER><H1>KDE 3.x API Reference</H1></CENTER>
+
+EOF
+
+#
+# list all the api start pages
+#
+
+cat >> $r/${kdeapi}/index.html <<EOF
+<TABLE WIDTH="100%" BORDER="0">
+<TR bgcolor="b0b0b0">
+<TH>&nbsp;</TH><TH>Description</TH><TH>from package</TH></TR>
+<TR bgcolor="ffffff"><TD><A HREF="/usr/share/doc/packages/qt3/html/classes.html">
+Qt </A></TD> <TD>all Qt classes</TD> <TD>qt</TD></TR>
+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/tde/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/tde/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/tde/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 "<TR bgcolor=\"eeeeee\">" >> $r/${kdeapi}/index.html
+ else
+ dark=1
+ echo "<TR bgcolor=\"ffffff\">" >> $r/${kdeapi}/index.html
+ fi
+
+ echo "<TD><A HREF=\"${apipath}\"> ${mod} </A></TD>" >> $r/${kdeapi}/index.html
+ echo "<TD>${description}</TD>" >> $r/${kdeapi}/index.html
+ echo "<TD>${package}</TD>" >> $r/${kdeapi}/index.html
+ echo "</TR>" >> $r/${kdeapi}/index.html
+
+done
+
+#
+# finish it ...
+#
+cat >> $r/${kdeapi}/index.html <<EOF
+</TABLE>
+<hr>
+<table>
+<tr><td><small> generated by create-kdeapi on `date` </td></tr>
+</table>
+
+</body>
+</html>
+EOF