aboutsummaryrefslogtreecommitdiffstats
path: root/getstats.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-07 15:33:25 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-02-07 15:33:25 +0000
commit2cc6b4f87dffa3393895b19b7ccf7f024218d5bb (patch)
tree4aaad581e4bb1a52132a676a27570160a0d7f65d /getstats.py
parenta944bfd1e9c51a2b12be71666f4b7891f9ec3bec (diff)
downloadfetchmail-2cc6b4f87dffa3393895b19b7ccf7f024218d5bb.tar.gz
fetchmail-2cc6b4f87dffa3393895b19b7ccf7f024218d5bb.tar.bz2
fetchmail-2cc6b4f87dffa3393895b19b7ccf7f024218d5bb.zip
Initial revision
svn path=/trunk/; revision=3031
Diffstat (limited to 'getstats.py')
-rwxr-xr-xgetstats.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/getstats.py b/getstats.py
new file mode 100755
index 00000000..563b39e0
--- /dev/null
+++ b/getstats.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python
+#
+# Collect statistics on current release.
+
+import commands, string, ftplib
+
+# Get version and date
+date = commands.getoutput("date")
+ln = commands.getoutput("co -p RCS/*.[chly],v 2>/dev/null | wc -l")
+vers = commands.getoutput("sed -n -e '/VERSION/s/VERSION *= *\\(.*\\)/\\1/p' <Makefile")
+print "fetchmail-" + vers + " (" + date + "), " + string.strip(ln) + " lines:"
+
+# Get mailing-list statistics.
+def bumpcount(str):
+ global linecount
+ linecount = linecount + 1
+ftp = ftplib.FTP('locke.ccil.org', 'esr', 'Malvern')
+linecount = 0
+ftp.retrlines("RETR fetchmail-friends", bumpcount)
+friends = linecount - 1
+linecount = 0
+ftp.retrlines("RETR fetchmail-announce", bumpcount)
+announce = linecount
+print "There are %d people on fetchmail-friends and %d on fetchmail-announce."% (friends, announce)
+
+# getstats.py