Skip to content

Commit

Permalink
c
Browse files Browse the repository at this point in the history
  • Loading branch information
pbeazer committed Jan 19, 2024
1 parent d97fd6e commit c7b79cd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions literary_clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ def getTimeQuotes(currentTime,depth):

quotes_path = 'images/metadata/quote_%s_*_credits.png' % hour_minute
quotes = glob(quotes_path)
if len(quotes) == 0:
# print("No quotes for "+hour_minute)
# if len(quotes) == 0:
# # print("No quotes for "+hour_minute)

# Call the same request, but 1 minute ago
return getTimeQuotes(currentTime-timedelta(minutes=1),depth+1)
else:
# # Call the same request, but 1 minute ago
# return getTimeQuotes(currentTime-timedelta(minutes=1),depth+1)
# else:
# print("Got quote for "+hour_minute)
return quotes, firstTry
return quotes, firstTry


def main():
Expand All @@ -41,11 +41,11 @@ def main():
image.paste(quoteImage, (0, 80))

# If not our first try, also write the current time
if not firstTry:
now_time = now.strftime('%I:%M %p')
draw_time = ImageDraw.Draw(image)
time_font = ImageFont.truetype('Literata72pt-Regular.ttf', 30)
draw_time.text((670, 30), now_time, font=time_font, fill=0)
#if not firstTry:
now_time = now.strftime('%I:%M %p')
draw_time = ImageDraw.Draw(image)
time_font = ImageFont.truetype('Literata72pt-Regular.ttf', 30)
draw_time.text((670, 30), now_time, font=time_font, fill=0)

today = now.strftime('%a, %B, %d')
dayFont = ImageFont.truetype('Literata72pt-Regular.ttf', 48)
Expand Down

0 comments on commit c7b79cd

Please sign in to comment.