#!/usr/bin/env python import cgi import cgitb import glob cgitb.enable() form = cgi.FieldStorage() print 'Content-Type: text/html\n' # Functions def unit_selector(): """Return an HTML snippet to select units with.""" if units == 'metric': return '
Units: metric|sae
' else: return 'Units: metric|sae
' # Determine units to display units = 'metric' if 'units' in form: if form.getfirst('units') == 'sae': units = 'sae' # Figure out the latest image graph_list=glob.glob('graph_%s_*.png' % units) graph_list.sort() latest=graph_list[-1] previous=[] for graph in graph_list[:50]: previous.append('
|
Previous Graphs:
|
2011 Nov 23
I added a chart showing my average daily gain/loss rate.
2011 Oct 2
While cleaning out an old hard drive I found two datapoints from last March. I've added them to the record to show that my weight used to stay fairly stable, if a bit high.
The raw data and scripts that generate the above graph are here: