preferred_names = {}
with open(self.__fn_studentinfo, 'r') as f:
- for line in f.readlines():
- x = line.strip().split("\t")
- if x[0] == "Timestamp":
- continue
-
- preferred_names[x[4]] = x[2]
+ for row in DictReader(f, delimiter="\t"):
+ preferred_names[row["Your username on the class Discord server"]] = row["Name you'd like to go by in class"]
if selected_student in preferred_names:
return preferred_names[selected_student]
return coldcall_message
# cc = ColdCall()
+
+# test_student_list = ["jordan", "Kristen Larrick", "Madison Heisterman", "Maria.Au20", "Laura (Alia) Levi", "Leona Aklipi", "Linya Feng", "anne", "kirst", "emmaaitelli", "ashleylee", "allie_partridge", "Tiana_Cole", "Hamin", "Ella Qu", "Angel Su", "Shizuka", "Ben Baird", "Kim Do", "Isaacm24", "Sam Bell", "Courtneylg", "TasnimHasan"]
+# print(cc.coldcall(test_student_list))
-# test_student_list = ["Jordan", "Kristen Larrick", "Madison Heisterman", "Maria.Au20", "Laura (Alia) Levi", "Leona Aklipi", "Linya Feng", "anne", "kirst", "emmaaitelli", "ashleylee", "allie_partridge", "Tiana_Cole", "Hamin", "Ella Qu", "Angel Su", "Shizuka", "Ben Baird", "Kim Do", "Isaacm24", "Sam Bell", "Courtneylg", "TasnimHasan"]
-# cc.coldcall(test_student_list)
-
-# test_student_list = ["Jordan", "Kristen Larrick", "Mako"]
-# cc.coldcall(test_student_list)
+# test_student_list = ["jordan", "Kristen Larrick", "Mako"]
+# print(cc.coldcall(test_student_list))
-# test_student_list = ["Jordan", "Kristen Larrick"]
-# cc.coldcall(test_student_list)
+# test_student_list = ["jordan", "Kristen Larrick"]
+# print(cc.coldcall(test_student_list))