Skip to content

Instantly share code, notes, and snippets.

@vdavez
Created July 3, 2015 13:46
Show Gist options
  • Save vdavez/70f6dab4129a17c2e335 to your computer and use it in GitHub Desktop.
Save vdavez/70f6dab4129a17c2e335 to your computer and use it in GitHub Desktop.
NPR Alarm
#/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