summaryrefslogtreecommitdiffstats
path: root/doc/kdevelop/listplugins.sh
blob: f916b7fe689a8cec2a9d8a1201287370af337c14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

# kdevdir must be set to the KDevelop project directory.
kdevdir=/home/volker/data/prj/tdevelop/tdevelop/
# The plugins are in the parts/ subdirectory.

pushd $kdevdir/parts >/dev/null
oldscope=nix
echo "<para>The following plugin list is generated by a small script"
echo "written by Volker Paul. All plugins have a .desktop file"
echo "where information such as name and comments are written."
echo "If in the following these comments are not very useful,"
echo "it is because the plugin authors made them this way.</para>"
echo "<para>The plugins are grouped by scope (Core, Global, Project).</para>"

for defscope in Core Global Project; do
   if [ $defscope != $oldscope ]; then
      oldscope=$defscope
      echo
#      echo "<sect1><title>Scope: $defscope</title>"
      echo "<para>Scope: $defscope</para>"
      echo "<itemizedlist>"
   fi
   for dir in `ls`; do
	if [ ! -d $dir ]; then continue; fi
	dfile=$dir/*.desktop
	# echo $dfile | wc -w
	if [ `echo $dfile | wc -w` -gt 1 ]; then continue; fi
	if [ ! -f $dfile ]; then continue; fi
	scope=`cat $dfile | grep "X-KDevelop-Scope=" | cut -d= -f2-`
	if [ $scope != $defscope ]; then continue; fi
	comment=`cat $dfile | grep "Comment=" | cut -d= -f2-`
	name=`cat $dfile | egrep "^Name=" | cut -d= -f2- | tr " " _`
	genericname=`cat $dfile | grep "GenericName=" | cut -d= -f2-`
	echo "<listitem><formalpara id=\"$name\">"
	echo "<title>$genericname</title>"
	echo "<para>$comment</para></formalpara></listitem>"
   done
      echo "</itemizedlist>"
#      echo "</sect1>"
done
popd >/dev/null
echo "<para>So far the generated plugin list.</para>"
echo