public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sebastian Pipping" <sping@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/userinfo-scripts:master commit in: /
Date: Sun, 25 Mar 2012 00:47:08 +0000 (UTC)	[thread overview]
Message-ID: <1332636380.70c164c4cde357a6788c6f368685c16a46600a97.sping@gentoo> (raw)

commit:     70c164c4cde357a6788c6f368685c16a46600a97
Author:     Sebastian Pipping <sebastian <AT> pipping <DOT> org>
AuthorDate: Sun Mar 25 00:46:20 2012 +0000
Commit:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Sun Mar 25 00:46:20 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/userinfo-scripts.git;a=commit;h=70c164c4

Add script to generate Git identity maps (for git-svn or svn2git)

---
 git-identity-map.py |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/git-identity-map.py b/git-identity-map.py
new file mode 100755
index 0000000..c83a744
--- /dev/null
+++ b/git-identity-map.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Written by Sebastian Pipping <sebastian@pipping.org>
+# Licensed under GPL v2 or later
+
+from __future__ import print_function
+import xml.etree.ElementTree as ET  # Python 2.5
+import sys
+
+
+def main(args):
+	if len(args) != 2:
+		print('USAGE:  %s GENTOO/xml/htdocs/proj/en/devrel/roll-call/userinfo.xml' % args[0])
+		return 1
+
+	try:
+		userlist = ET.parse(args[1])
+	except IOError as e:
+		print(str(e), file=sys.stderr)
+		return 1
+
+	for user in userlist.findall('user'):
+		nick = user.attrib['username']
+		location = user.find('location')
+		realname = user.find('realname').attrib['fullname'].strip()
+
+		line = '%s = %s <%s@gentoo.org>' % (nick, realname, nick)
+		print(line.encode('utf-8'))
+
+	return 0
+
+
+if __name__ == '__main__':
+	ret = main(sys.argv)
+	sys.exit(ret)



             reply	other threads:[~2012-03-25  0:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-25  0:47 Sebastian Pipping [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-05-06 15:32 [gentoo-commits] proj/userinfo-scripts:master commit in: / Sebastian Pipping
2012-05-06 15:32 Sebastian Pipping
2012-05-06 16:02 Sebastian Pipping
2012-05-06 16:17 Sebastian Pipping
2012-11-11 17:55 Sebastian Pipping
2012-11-11 17:55 Sebastian Pipping
2012-11-11 20:59 Sebastian Pipping
2013-05-07  0:41 Sebastian Pipping
2013-05-07  0:41 Sebastian Pipping
2013-05-23 23:41 Sebastian Pipping
2014-06-15 19:00 Sebastian Pipping
2014-06-22 22:14 Sebastian Pipping
2014-06-22 23:26 Sebastian Pipping
2014-07-12 18:22 Sebastian Pipping
2014-07-12 18:22 Sebastian Pipping

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332636380.70c164c4cde357a6788c6f368685c16a46600a97.sping@gentoo \
    --to=sping@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox