diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-03-27 23:26:06 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-03-27 23:26:06 +0100 |
commit | bb5dfcd19312932113b678d78d2d1d34c70db3c1 (patch) | |
tree | 27356e10adeb4fee0795af6a491bd2c4416bb9cd /examples/weather | |
parent | update todo (diff) | |
download | blueshift-bb5dfcd19312932113b678d78d2d1d34c70db3c1.tar.gz blueshift-bb5dfcd19312932113b678d78d2d1d34c70db3c1.tar.bz2 blueshift-bb5dfcd19312932113b678d78d2d1d34c70db3c1.tar.xz |
doc + make it possible to select download command for weather
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'examples/weather')
-rw-r--r-- | examples/weather | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/weather b/examples/weather index 78b826e..3fac3e4 100644 --- a/examples/weather +++ b/examples/weather @@ -26,6 +26,11 @@ latitude, longitude = 59.3326, 18.0652 # (Stockholm Bromma Airport in this example.) airport = 'ESSB' +# Command used to download a file at an HTTP URL +download_command = None +# This is what if used if `None` is selected: +# download_command = lambda url : ['wget', url, '-O', '-'] + # The colour temperature at day and at night. temperature_day, temperature_night = 6500, 3700 @@ -47,7 +52,7 @@ visibility_max = 4 dayness = sun(latitude, longitude) # Get weather report. -metar = weather(airport) +metar = weather(airport, download_command) # Account for weather. if metar is not None: |