Skip to content

Commit

Permalink
Merge pull request #7 from pineapplemachine/master
Browse files Browse the repository at this point in the history
Added more default quotes, and datetime-dependent content
  • Loading branch information
vzhz committed Nov 23, 2018
2 parents 75d0d76 + c6bae02 commit 5908b23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion quotes_for_terminal.txt
Expand Up @@ -4,7 +4,7 @@ Don't forget to save your work early and often!
Don't sweat it, %(name)s. You're making good progress.
Good %(timeOfDay)s! What fantastic things are you building today?
Good %(timeOfDay)s, %(name)s. How are you doing?
Hard work is good for the soul, but so is rest. Are you well-rested %(todayOrTonight)?
Hard work is good for the soul, but so is rest. Are you well-rested %(todayOrTonight)s?
Have you made any backups of your work lately, %(name)s?
Hello again, %(name)s. How are you doing this %(timeOfDay)s?
Hello, %(name)s! How's your %(timeOfDay)s going so far?
Expand Down
6 changes: 3 additions & 3 deletions randline.py
Expand Up @@ -3,21 +3,21 @@
import datetime

def timeOfDay(time):
if time.hour <= 2 or time.hour >= 6:
if time.hour <= 2 or time.hour >= 18:
return 'evening'
elif time.hour <= 12:
return 'morning'
else:
return 'afternoon'

def dayOrNight(time):
if time.hour <= 4 or time.hour >= 8:
if time.hour <= 4 or time.hour >= 20:
return 'night'
else:
return 'day'

def todayOrTonight(time):
if time.hour <= 4 or time.hour >= 8:
if time.hour <= 4 or time.hour >= 20:
return 'tonight'
else:
return 'today'
Expand Down

0 comments on commit 5908b23

Please sign in to comment.