From e2f8248a0ae748c70183393a5ba228ab0629bec6 Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Tue, 16 May 2017 11:54:12 +0200 Subject: [PATCH] update photography temporarily for logitech cam. docstring cleanup. --- screenless/bureau/photography/photography.py | 6 +++++- screenless/bureau/publications/publications.py | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/screenless/bureau/photography/photography.py b/screenless/bureau/photography/photography.py index a9d6fa8..3ca8364 100644 --- a/screenless/bureau/photography/photography.py +++ b/screenless/bureau/photography/photography.py @@ -57,6 +57,10 @@ class Photography(Bureau): gpio.setcfg(self.a5_pin, gpio.INPUT) gpio.pullup(self.a5_pin, gpio.PULLUP) + # make sure tmp dir exists + tmpdir = "/tmp/webcam" + if not os.path.exists(tmpdir): + os.mkdir(tmpdir) def _doc_light_on(self): gpio.output(self.doc_light_pin, gpio.HIGH) @@ -87,7 +91,7 @@ class Photography(Bureau): mjpg = os.path.join(modpath, "..", "..", "lib", "mjpg-streamer", "mjpg-streamer-experimental", "run.sh") mjpg_dir = os.path.dirname(mjpg) - cmd = mjpg.split() + ["-i", "input_uvc.so -r 3264x2448 -n", "-o", "output_file.so -f /tmp/webcam -d 500 -s 2"] + cmd = mjpg.split() + ["-i", "input_uvc.so -r 1920x1080 -n", "-o", "output_file.so -f /tmp/webcam -d 500 -s 2"] print(cmd) #proc = subprocess.Popen(cmd, shell=True, env={"LD_LIBRARY_PATH": mjpg_dir}) diff --git a/screenless/bureau/publications/publications.py b/screenless/bureau/publications/publications.py index 2de21cc..f1c8066 100644 --- a/screenless/bureau/publications/publications.py +++ b/screenless/bureau/publications/publications.py @@ -98,6 +98,11 @@ class Publications(Bureau): @add_command("news", "Print a personalized daily newspaper") def daily_news(self): + """ + Print out a selection of up-to-the-minute news items culled from various + sources on the internet. Current unread Post, weather and finance + information can also be shown. + """ news = self._get_news() # TODO: get weather # TODO: get finance