]> Pileus Git - ~andy/fetchmail/blob - getstats.py
Initial revision
[~andy/fetchmail] / getstats.py
1 #!/usr/bin/python
2 #
3 # Collect statistics on current release.
4
5 import commands, string, ftplib
6
7 # Get version and date
8 date = commands.getoutput("date")
9 ln = commands.getoutput("co -p RCS/*.[chly],v 2>/dev/null | wc -l")
10 vers = commands.getoutput("sed -n -e '/VERSION/s/VERSION *= *\\(.*\\)/\\1/p' <Makefile")
11 print "fetchmail-" + vers + " (" + date + "), " + string.strip(ln) + " lines:"
12
13 # Use local listsize command to grab list statistics
14 friends = commands.getoutput("listsize friends").strip()
15 announce = commands.getoutput("listsize announce").strip()
16 print "There are %s people on fetchmail-friends and %s on fetchmail-announce."% (friends, announce)
17
18 # getstats.py