summaryrefslogtreecommitdiffstats
path: root/examples/comprehensive
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-27 23:26:06 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-27 23:26:06 +0100
commitbb5dfcd19312932113b678d78d2d1d34c70db3c1 (patch)
tree27356e10adeb4fee0795af6a491bd2c4416bb9cd /examples/comprehensive
parentupdate todo (diff)
downloadblueshift-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 '')
-rw-r--r--examples/comprehensive9
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/comprehensive b/examples/comprehensive
index b164212..96e3d96 100644
--- a/examples/comprehensive
+++ b/examples/comprehensive
@@ -82,6 +82,13 @@ def by_time():
return 1 # Error in `time_alpha` (probably)
+
+# 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', '-']
+
+
# Method for applying colour curves.
apply_curves = randr
#apply_curves = vidmode
@@ -318,7 +325,7 @@ def periodically(year, month, day, hour, minute, second, weekday, fade):
(metar, last_time) = (None, None) if last_metar is None else last_metar
now_time = minute
if (metar is None) or (now_time < last_time) or (last_time < now_time + 5):
- metar = weather(airport)
+ metar = weather(airport, download_command)
last_metar = (metar, now_time)
# Account for weather.