summaryrefslogtreecommitdiffstats
path: root/scripts/kdedoc
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbd9e6617827818fd043452c08c606f07b78014a0 (patch)
tree425bb4c3168f9c02f10150f235d2cb998dcc6108 /scripts/kdedoc
downloadtdesdk-bd9e6617827818fd043452c08c606f07b78014a0.tar.gz
tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'scripts/kdedoc')
-rwxr-xr-xscripts/kdedoc48
1 files changed, 48 insertions, 0 deletions
diff --git a/scripts/kdedoc b/scripts/kdedoc
new file mode 100755
index 00000000..0dc20a66
--- /dev/null
+++ b/scripts/kdedoc
@@ -0,0 +1,48 @@
+#!/bin/sh
+# Run from command line, to open a kde help page in kfm/konqueror
+# Argument : The classname (case sensitive !).
+# Both doxygen and kdoc docs are supported.
+
+# You can edit this line to set the directory holding your KDE docs, or you
+# can use the environment variable KDEDOCS to avoid future conflicts with this
+# file if the default changes.
+KDEDOCS=${KDEDOCS:-"$KDEDIR/share/doc/HTML/en/kdelibs-apidocs"}
+
+if [ $# = 1 ]; then
+ if [ -e "$KDEDOCS/doxygen.css" ]; then
+ # Docs are laid out in doxygen style.
+ if [ -f "$KDEDOCS/class$1.html" ]; then
+ kfmclient exec "$KDEDOCS/class$1.html"
+ elif [ -f "$KDEDOCS"/*/html/"class$1.html" ]; then
+ kfmclient exec "$KDEDOCS"/*/html/"class$1.html"
+ else
+ classstring=`echo "$1" | sed -e 's/::/_1_1/'`
+ if [ -f "$KDEDOCS/class$classstring.html" ]; then
+ kfmclient exec "$KDEDOCS/class$classstring.html"
+ elif [ -f "$KDEDOCS"/*/html/"class$classstring.html" ]; then
+ kfmclient exec "$KDEDOCS"/*/html/"class$classstring.html"
+ elif [ -f "$KDEDOCS"/class*_1_1"$1.html" ]; then
+ kfmclient exec "$KDEDOCS"/class*_1_1"$1.html"
+ elif [ -f "$KDEDOCS"/*/html/class*_1_1"$1.html" ]; then
+ kfmclient exec "$KDEDOCS"/*/html/class*_1_1"$1.html"
+ else
+ echo "No class $1 in $KDEDOCS/*"
+ exit 1
+ fi
+ fi
+ elif [ -e "$KDEDOCS/kdecore/index.html" ]; then
+ # Docs are laid out in kdoc style.
+ if [ -f "$KDEDOCS"/*/"$1.html" ]; then
+ kfmclient exec "$KDEDOCS"/*/"$1.html"
+ else
+ echo "No class $1 in $KDEDOCS/*"
+ exit 1
+ fi
+ else
+ echo "$KDEDOCS does not appear to contain your KDE docs."
+ exit 1
+ fi
+else
+ echo "Usage : $0 <classname>"
+ exit 1
+fi