summaryrefslogtreecommitdiffstats
path: root/scripts/authors2xml.pl
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/authors2xml.pl
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/authors2xml.pl')
-rwxr-xr-xscripts/authors2xml.pl27
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/authors2xml.pl b/scripts/authors2xml.pl
new file mode 100755
index 00000000..c2e34438
--- /dev/null
+++ b/scripts/authors2xml.pl
@@ -0,0 +1,27 @@
+#!/usr/bin/perl -w
+# Extract author information from C++ files
+# and print it out in DocBook format as a list
+# Daniel Naber <daniel.naber@t-online.de>
+# $Id$
+
+my $file = $ARGV[0];
+if( ! $file ) {
+ print "Usage: $0 <file.cpp>\n";
+ exit;
+}
+
+open(IN, $file) || die "Cannot open '$file': $!\n";
+undef $/;
+my $str = (<IN>);
+close(IN);
+
+print "<itemizedlist>\n";
+while( $str =~ m/addAuthor\s*\(\s*"(.*?)",\s*.*?,\s*"(.*?)"/gs ) {
+ my ($name, $email) = ($1, $2);
+ print "<listitem><para>$name <email>$email</email></para></listitem>\n";
+ #print "$name, $email\n";
+}
+print "</itemizedlist>\n";
+
+print STDERR "Warning: maybe you need to fix umlauts manually...\n";
+exit;