Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update for fall 24 active members #208

Merged
merged 2 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
374 changes: 229 additions & 145 deletions data/members.ts

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions data/scripts/common.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from typing import NamedTuple

class OtherInfo(NamedTuple):
fields = [f'field{i}' for i in range(19)]
fields[12] = 'name'
fields[13] = 'pronouns'
fields[16] = 'year'
fields[17] = 'major'
fields[18] = 'photo'
fields = [f'field{i}' for i in range(21)]
fields[14] = 'name'
fields[15] = 'pronouns'
fields[18] = 'year'
fields[19] = 'major'
fields[20] = 'photo'
__annotations__ = {field: str for field in fields}

member_template = {
Expand Down
26 changes: 16 additions & 10 deletions data/scripts/update_members.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
from common import OtherInfo, member_template, find_new_member_data

class RequirementInfo(NamedTuple):
fields = [f'field{i}' for i in range(4)]
fields = [f'field{i}' for i in range(3)]
fields[0] = 'name'
fields[3] = 'role'
fields[2] = 'role'
__annotations__ = {field: str for field in fields}

with open('tmp/old-member-data','r') as f:
old_data = f.read()
old_data_json = json.loads(old_data)
with open('clubdata/requirement.tsv','r') as f:
new_data = list(filter(lambda x: "#N/A" not in x,[RequirementInfo(*i.split('\t')[:4]) for i in f.read().split('\n')[1:]]))
new_data = list(filter(lambda x: "#N/A" not in x,[RequirementInfo(*i.split('\t')[:3]) for i in f.read().split('\n')[1:]]))
with open('clubdata/membership.tsv','r') as f:
new_extra_data = list(filter(lambda x: "Not found" not in x,[OtherInfo(*i.split('\t')[:19]) for i in f.read().split('\n')[1:]]))
new_extra_data = list(filter(lambda x: "Not found" not in x,[OtherInfo(*i.split('\t')[:21]) for i in f.read().split('\n')[1:]]))

presidents = []
advisors = []
officers = []
Expand All @@ -33,7 +34,7 @@ def check_member(member_name,member_list):
member['role'] = "Officer"
officers.append(member)
continue
elif off == 't':
elif off == 'g':
continue
pres = input('is this a president? ')
if pres == 'y':
Expand Down Expand Up @@ -70,12 +71,17 @@ def check_member(member_name,member_list):
new_member_json['role'] = new_member.role
else:
new_member_json = old_member
print(other_data)
if other_data:
new_member_json["pronouns"] = other_data.pronouns
transfer = other_data.year.split()[3] == 'transfer'
year = ' '.join(other_data.year.split()[:2])
if transfer:
year += ' Transfer'
if other_data.pronouns:
new_member_json["pronouns"] = other_data.pronouns
if other_data.year:
transfer = other_data.year.split()[3] == 'transfer'
year = ' '.join(other_data.year.split()[:2])
if transfer:
year += ' Transfer'
else:
year = input("Enter year: ")
print(other_data.major)
major = input("What major is this? ")
if major == 'y':
Expand Down
Binary file added public/images/members/alyssaleung.webp
Binary file not shown.
Binary file added public/images/members/alyssawong.webp
Binary file not shown.
Binary file added public/images/members/harini.webp
Binary file not shown.
Binary file added public/images/members/roshni.webp
Binary file not shown.
Binary file added public/images/members/samyukhtha.webp
Binary file not shown.
Binary file added public/images/members/sophia.webp
Binary file not shown.