#!/bin/sh
# Extracts data as date,temp CSV to stdout from the HTML page source:
# .note-on-data-for-16WW-mains-water-inlet-temperature.html
#
# Input rows of form:
#
14°C | 2008-11-19 08:36 UTC | |
# Output CSV with lines of form (note date now first, and without time):
# 2008-11-19,14
SRC=.note-on-data-for-16WW-mains-water-inlet-temperature.html
sed <$SRC -n -e 's/^ *\([0-9]*\).deg;C *<\/td> | *\(20[0-9][0-9]-[01][0-9]-[0-3][0-9]\) *.*$/\2,\1/gp'
|