I had some fun last night whipping up some statistics for my weblog.
I’ve got some plain python code that takes a month/date/year directory
structure, reads all the files in there and creates restructuredtext index.txt
pages in every directory that list the files in there. That’s what turns into
all those overview pages, for instance for March 2007 or for tag pages like
for the Sorrento sprint in 2007.
That very same piece of code is what I use to make the statistics. Reading
the weblog directory results in some nested Year, Month and Day objects, which
I can of course call len()
on. Coupled with a bit of code to generate
google chart API URLs, I got pretty
results pretty quick. See http://reinout.vanrees.org/weblog/statistics.html
. Here’s an example:
My name is Reinout van Rees and I program in Python, I live in the Netherlands, I cycle recumbent bikes and I have a model railway.
Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):