diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch) | |
tree | acaf47eb0fa12142d3896416a69e74cbf5a72242 /doc/tools/index-python | |
download | tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.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/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'doc/tools/index-python')
-rw-r--r-- | doc/tools/index-python | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/doc/tools/index-python b/doc/tools/index-python new file mode 100644 index 00000000..96cfcd8f --- /dev/null +++ b/doc/tools/index-python @@ -0,0 +1,52 @@ +#!/usr/bin/perl + +use Getopt::Long; + +my $prefix = ''; +GetOptions( 'prefix=s' => \$prefix ) || die "Wrong options\n"; + +$file = $ARGV[0]; +open(FILE, "$file") || die "File not found: $file\n"; + +print "<conceptindex>\n"; + +$ingroup = 0; +while (<FILE>) { + + if (/\<dt\>\<a href=\'(.+)'\>(.+)\<\/a\>/) { +# print "Index: $1, $2, $ingroup\n"; + if ($ingroup) { + $name = "$ingroup, $2"; + } else { + $name = $2; + } + $url = "$prefix/$1"; + print "<entry name=\"$name\" url=\"$url\"/>\n"; + } elsif (/\<dt\>(.+)/) { +# print "Ingroup: $1\n"; + $ingroup = $1; + } elsif (/\s+\<\/dl>/) { + $ingroup = 0; + } +} + +print "</conceptindex>\n"; +close(FILE); + + +sub dehtml +{ + my ( $str ) = @_; + + $str =~ s/\<CODE\>//g; + $str =~ s/\<\/CODE\>//g; + $str =~ s/\<TT\>//g; + $str =~ s/\<\/TT\>//g; + + return $str; +} + +# Local Variables: +# mode: perl +# fill-column: 120 +# End: |