3 # Collect statistics on current release.
5 import commands, os, string, ftplib
8 date = commands.getoutput("LC_TIME=C date -u")
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):
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:"
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)