Add stars to home screen

This commit is contained in:
Tanner Collin 2022-09-14 15:03:39 -06:00
parent 2d2644a267
commit f2771babaa

24
main.py
View File

@ -93,7 +93,7 @@ if wa_api_key:
def think_send(query): def think_send(query):
result = '' result = ''
try: try:
res = wa_client.query(query, timeout=20) res = wa_client.query(query, timeout=5)
except BaseException as e: except BaseException as e:
logging.error('Error hitting W|A API: {} - {}\n'.format(e.__class__.__name__, e)) logging.error('Error hitting W|A API: {} - {}\n'.format(e.__class__.__name__, e))
return 'Network error' return 'Network error'
@ -189,6 +189,7 @@ info_line = 0
logging.info('Starting main loop...') logging.info('Starting main loop...')
while True: while True:
if current_screen != 'debug':
c = 0 c = 0
if current_screen == 'home': if current_screen == 'home':
@ -225,7 +226,26 @@ while True:
stdscr.addstr(21, 4, '[A]', curses.A_REVERSE if highlight_keys else 0) stdscr.addstr(21, 4, '[A]', curses.A_REVERSE if highlight_keys else 0)
stdscr.addstr(21, 8, 'About') stdscr.addstr(21, 8, 'About')
stdscr.addstr(22, 1, '') stdscr.addstr(22, 1, '')
stdscr.addstr(23, 1, ' Copyright (c) 1985 Bikeshed Computer Systems Corp.') stdscr.addstr(23, 1, ' Copyright (c) 1985')
stars = (9, 34)
stdscr.addstr(stars[0]+0 , stars[1], " . . * - )- ")
stdscr.addstr(stars[0]+1 , stars[1], " . * o . * ")
stdscr.addstr(stars[0]+2 , stars[1], " | ")
stdscr.addstr(stars[0]+3 , stars[1], " . -O- ")
stdscr.addstr(stars[0]+4 , stars[1], ". | * . -0- ")
stdscr.addstr(stars[0]+5 , stars[1], " * o . ' * . o")
stdscr.addstr(stars[0]+6 , stars[1], " . . | * ")
stdscr.addstr(stars[0]+7 , stars[1], " * * -O- .")
stdscr.addstr(stars[0]+8 , stars[1], " . * | , ")
stdscr.addstr(stars[0]+9 , stars[1], " . o ")
stdscr.addstr(stars[0]+10, stars[1], " .---. ")
stdscr.addstr(stars[0]+11, stars[1], " = _/__~0_\_ . * o ' ")
stdscr.addstr(stars[0]+12, stars[1], " = = (_________) . ")
stdscr.addstr(stars[0]+13, stars[1], " . * ")
stdscr.addstr(stars[0]+14, stars[1], " * - ) - * ")
stdscr.clrtoeol() stdscr.clrtoeol()
stdscr.refresh() stdscr.refresh()
elif current_screen == 'debug': elif current_screen == 'debug':