Created
July 3, 2015 13:46
-
-
Save vdavez/70f6dab4129a17c2e335 to your computer and use it in GitHub Desktop.
NPR Alarm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env python3 | |
import time | |
from subprocess import call | |
while(true): | |
dt = list(time.localtime()) | |
hour = dt[3] | |
minute = dt[4] | |
if hour == 8 and minute == 0: | |
call(["omxplayer --no-osd --no-keys http://public.npr.org/anon.npr-mp3/npr/news/newscast.mp3"], shell=True) | |
time.sleep(60) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment