]> Pileus Git - ~andy/fetchmail/blob - dist-tools/getstats.py
Update URL for OPIE at inner.net.
[~andy/fetchmail] / dist-tools / getstats.py
1 #!/usr/bin/env python
2 #
3 # Collect statistics on current release.
4
5 import commands, os, string, ftplib
6
7 # Get version and date
8 date = commands.getoutput("LC_TIME=C date -u")
9 pid = os.getpid()
10 # this is a fast variant using the base of the current working directory
11 # (ignores uncommitted modifications)
12 if os.system("svn export -q -rBASE . /tmp/getstats.%d" % pid):
13     print "SVN FAILED"
14     os.exit(1)
15 # this is a slower variant that may export the whole tree across the net
16 #os.system("svn export -rCOMMITTED . /tmp/getstats.%d" % pid)
17 ln = commands.getoutput("cat /tmp/getstats.%d/*.[chly] 2>/dev/null | wc -l" % pid)
18 os.system("rm -rf /tmp/getstats.%d" % pid)
19 vers = commands.getoutput("sed -n -e '/AC_INIT/s/AC_INIT(\[.*\],\[\\(.*\\)\])/\\1/p' <configure.ac")
20 print "fetchmail-" + vers + " (" + date + "), " + string.strip(ln) + " lines:"
21
22 # Use local listsize command to grab list statistics
23 #friends = commands.getoutput("listsize friends").strip()
24 #announce = commands.getoutput("listsize announce").strip()
25 #print "There are %s people on fetchmail-friends and %s on fetchmail-announce."% (friends, announce)
26
27 # getstats.py