Minor fixes

This commit is contained in:
Tanner Collin 2022-09-04 15:28:11 -06:00
parent 5118e9cc9a
commit 78719f425a
2 changed files with 25 additions and 28 deletions

View File

@ -146,10 +146,8 @@ Bigger Decisions and Getting Started
Getting Started Getting Started
--------------- ---------------
Since you're in this class, you've either been to the Portal or someone has The Protospace member portal is at my.protospace.ca. It's where you sign up for
done that for you. You can find that at my.protospace.ca. It's where you sign classes, make payments, see your records, and other things as we add them.
up for classes, make payments, see your records, and other things as we add
them.
You'll want to upload a photo of yourself. It's the photo that will go on your You'll want to upload a photo of yourself. It's the photo that will go on your
keycard when you get vetted. Some corporate partners in the past have asked keycard when you get vetted. Some corporate partners in the past have asked
@ -164,11 +162,10 @@ through the Portal in order to have access to the Member section.
We're not going to go into too much depth here, but most of the Forum is We're not going to go into too much depth here, but most of the Forum is
publicly viewable, aside from the Administrivia section (there's a lock beside publicly viewable, aside from the Administrivia section (there's a lock beside
it) so be mindful that things that only members should see go there. The Forum it) so be mindful that things that only members should see go there. The Forum
is pretty well broken into categories so it should be pretty obvious what goes is pretty well broken into categories so it should be obvious what goes where.
where.
You've already signed up for a class, but you might not know that you can You've already signed up for a class, but you might not know that you can
indicate interest by hitting the Interest button beside a course on the indicate interest by hitting the Interest+ button beside a course on the
classes page. The next time a class on that topic gets scheduled, you should classes page. The next time a class on that topic gets scheduled, you should
receive an email letting you know. It's a great way to let everyone know where receive an email letting you know. It's a great way to let everyone know where
priorities are and lets people with those knowledge-sets know that people priorities are and lets people with those knowledge-sets know that people
@ -196,8 +193,8 @@ will need to know at least a couple of people to be vetted
Vetting Vetting
------- -------
On to vetting. When you are vetted, you get voting rights, a shelf, 24/7 When you are vetted, you get voting rights, a shelf, 24/7 access to the space,
access to the space, and a keycard. and a keycard.
Everything I'm going to mention here typically happens on a Tuesday night, Everything I'm going to mention here typically happens on a Tuesday night,
though it can happen any time we have 11 vetted members and a Director though it can happen any time we have 11 vetted members and a Director
@ -205,13 +202,13 @@ present. If you are getting vetted on a Tuesday, please try to find a director
as soon as you get here, as this process can take some time. To be vetted, you as soon as you get here, as this process can take some time. To be vetted, you
need to tick a few boxes: need to tick a few boxes:
- You must be sponsored by 2 vetted members in good standing - You must be sponsored by 2 vetted members in good standing.
- You must have been a member for at least 4 weeks. - You must have been a member for at least 4 weeks.
- You must be current on your dues. - You must be current on your dues.
- You must show ID and provide a photo for the member directory. - You must show ID and provide a photo for the member directory.
- You must complete a short 1-on-1 chat with a director or designate. This is - You must complete a short 1-on-1 chat with a director or designate. This is
about making sure you have the knowledge you need from us—it's not a about making sure you have the knowledge you need from us—it's not a
screening interview. screening interview.
- You should also be given an in-person tour of the space, including opening - You should also be given an in-person tour of the space, including opening
and closing procedures. and closing procedures.

34
main.py
View File

@ -3,7 +3,7 @@
import os, logging import os, logging
DEBUG = os.environ.get('DEBUG') DEBUG = os.environ.get('DEBUG')
logging.basicConfig( logging.basicConfig(
filename='protovax.log', encoding='utf-8', filename='protovax.log',
format='[%(asctime)s] %(levelname)s %(module)s/%(funcName)s - %(message)s', format='[%(asctime)s] %(levelname)s %(module)s/%(funcName)s - %(message)s',
level=logging.DEBUG if DEBUG else logging.INFO) level=logging.DEBUG if DEBUG else logging.INFO)
@ -14,6 +14,7 @@ import curses
import requests import requests
import pytz import pytz
import re import re
import os
from datetime import datetime from datetime import datetime
try: try:
@ -22,13 +23,12 @@ try:
except: except:
wa_api_key = None wa_api_key = None
ENTER_KEY = 10
BACKSPACE_KEY = 263
ESCAPE_KEY = 27 ESCAPE_KEY = 27
TIMEZONE_CALGARY = pytz.timezone('America/Edmonton') TIMEZONE_CALGARY = pytz.timezone('America/Edmonton')
with open('info.txt') as f: location = os.path.dirname(os.path.realpath(__file__))
with open(location + '/info.txt') as f:
PROTO_INFO = f.read() PROTO_INFO = f.read()
def format_date(datestr): def format_date(datestr):
@ -194,7 +194,7 @@ while True:
stdscr.addstr(15, 4, '[C] Classes') stdscr.addstr(15, 4, '[C] Classes')
stdscr.addstr(17, 4, '[P] Protocoin') stdscr.addstr(17, 4, '[P] Protocoin')
if wa_api_key: if wa_api_key:
stdscr.addstr(17, 4, '[T] Think') stdscr.addstr(19, 4, '[T] Think')
stdscr.addstr(21, 4, '[A] About') stdscr.addstr(21, 4, '[A] About')
stdscr.addstr(23, 1, ' Copyright (c) 1985 Bikeshed Computer Systems Corp.') stdscr.addstr(23, 1, ' Copyright (c) 1985 Bikeshed Computer Systems Corp.')
@ -442,10 +442,10 @@ while True:
current_screen = 'home' current_screen = 'home'
classes = {} classes = {}
classes_start = 0 classes_start = 0
elif button == 'j': elif button == 'j' or c == curses.KEY_DOWN:
classes_start += 1 classes_start += 1
stdscr.erase() stdscr.erase()
elif button == 'k': elif button == 'k' or c == curses.KEY_UP:
if classes_start > 0: if classes_start > 0:
classes_start -= 1 classes_start -= 1
stdscr.erase() stdscr.erase()
@ -454,33 +454,33 @@ while True:
current_screen = 'home' current_screen = 'home'
protocoin = {} protocoin = {}
info_line = 0 info_line = 0
elif button == 'j': elif button == 'j' or c == curses.KEY_DOWN:
info_line += 5 info_line += 19
stdscr.erase() stdscr.erase()
elif button == 'k': elif button == 'k' or c == curses.KEY_UP:
if info_line > 0: if info_line > 0:
info_line -= 5 info_line -= 19
stdscr.erase() stdscr.erase()
elif current_screen == 'protocoin': elif current_screen == 'protocoin':
if button == 'b': if button == 'b':
current_screen = 'home' current_screen = 'home'
protocoin = {} protocoin = {}
protocoin_line = 0 protocoin_line = 0
elif button == 'j': elif button == 'j' or c == curses.KEY_DOWN:
protocoin_line += 1 protocoin_line += 1
stdscr.erase() stdscr.erase()
elif button == 'k': elif button == 'k' or c == curses.KEY_UP:
if protocoin_line > 0: if protocoin_line > 0:
protocoin_line -= 1 protocoin_line -= 1
stdscr.erase() stdscr.erase()
elif current_screen == 'sign': elif current_screen == 'sign':
if sign_to_send: if sign_to_send:
if c == BACKSPACE_KEY: if c == curses.KEY_BACKSPACE:
sign_to_send = sign_to_send[:-2] + '_' sign_to_send = sign_to_send[:-2] + '_'
elif c == ESCAPE_KEY: elif c == ESCAPE_KEY:
sign_to_send = '' sign_to_send = ''
stdscr.erase() stdscr.erase()
elif c == ENTER_KEY: elif c == curses.KEY_ENTER:
if len(sign_to_send) > 1: if len(sign_to_send) > 1:
stdscr.addstr(15, 4, 'Sending...') stdscr.addstr(15, 4, 'Sending...')
stdscr.refresh() stdscr.refresh()
@ -496,12 +496,12 @@ while True:
sign_to_send = '_' sign_to_send = '_'
elif current_screen == 'think': elif current_screen == 'think':
if think_to_send: if think_to_send:
if c == BACKSPACE_KEY: if c == curses.KEY_BACKSPACE:
think_to_send = think_to_send[:-2] + '_' think_to_send = think_to_send[:-2] + '_'
elif c == ESCAPE_KEY: elif c == ESCAPE_KEY:
think_to_send = '' think_to_send = ''
stdscr.erase() stdscr.erase()
elif c == ENTER_KEY: elif c == curses.KEY_ENTER:
if len(think_to_send) > 1: if len(think_to_send) > 1:
stdscr.addstr(9, 4, 'Thinking...') stdscr.addstr(9, 4, 'Thinking...')
stdscr.clrtoeol() stdscr.clrtoeol()