Skip to content

Instantly share code, notes, and snippets.

@miawgogo
Created September 21, 2016 20:33
Show Gist options
  • Save miawgogo/6aa5d8d12b3d73995bd98b952210bd92 to your computer and use it in GitHub Desktop.
Save miawgogo/6aa5d8d12b3d73995bd98b952210bd92 to your computer and use it in GitHub Desktop.
simple python alarm clock
# A simple python alarm clock
# example: python alarm.py [time in 24h with :] [music file]
# example: python alarm.py "6:30" "Trollenn.mp3"
import time, os, sys
ctime = time.strftime("%H:%M")
print(ctime)
while ctime != sys.argv[1]:
ctime = time.strftime("%H,%M")
os.system("mpv " + sys.argv[2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment