Add analog clock faces
This commit is contained in:
parent
ed5ea4c2ab
commit
717b208a94
1 changed files with 46 additions and 42 deletions
|
@ -6,6 +6,7 @@ import time
|
|||
import pytz
|
||||
|
||||
|
||||
try:
|
||||
if len(sys.argv) < 3:
|
||||
print("Usage: {scriptname} timezone_left timezone_right".format(scriptname=sys.argv[0]), file=sys.stderr)
|
||||
exit(1)
|
||||
|
@ -18,7 +19,7 @@ except pytz.exceptions.UnknownTimeZoneError as e:
|
|||
exit(1)
|
||||
|
||||
|
||||
faces = "🕛🕧🕐🕜🕑🕝🕒🕞🕓🕟🕔🕠🕕🕡🕖🕢🕗🕣🕘🕤🕙🕥🕚🕦"
|
||||
faces = "🕛🕧🕐🕜🕑🕝🕒🕞🕓🕟🕔🕠🕕🕡🕖🕢🕗🕣🕘🕤🕙🕥🕚🕦🕛"
|
||||
|
||||
def face_for(t):
|
||||
minute = (t.minute + 15) // 30
|
||||
|
@ -61,3 +62,6 @@ while True:
|
|||
|
||||
delay = 60 - localnow.second - (localnow.microsecond * 10e-7)
|
||||
time.sleep(delay)
|
||||
|
||||
except Exception as e:
|
||||
print(e, file=sys.stderr)
|
||||
|
|
Loading…
Reference in a new issue