semester change

This commit is contained in:
Coding with Peter 2023-03-31 10:34:28 -07:00
parent 55290f9fa1
commit 035db48464
1 changed files with 4 additions and 2 deletions

View File

@ -1999,7 +1999,7 @@ def remove_year(s):
def argos_data_from_cvc(): def argos_data_from_cvc():
global dean,gp global dean,gp
short_sem = 'su23' short_sem = 'fa23'
f3 = codecs.open('cache/%s_sched.json' % short_sem, 'w', 'utf-8') f3 = codecs.open('cache/%s_sched.json' % short_sem, 'w', 'utf-8')
all_courses = [] all_courses = []
@ -2074,7 +2074,7 @@ def expand_old_semesters():
input('press return to continue.') input('press return to continue.')
# Input: xxxx_sched.json. Output: xxxx_latestarts.txt # Input: xxxx_sched.json. Output: xxxx_latestarts.txt
def list_latestarts(term="sp23"): def list_latestarts(term="su23"):
show_summary = 1 show_summary = 1
@ -2168,6 +2168,7 @@ def list_latestarts(term="sp23"):
#print(Y) #print(Y)
#outfile.write("\t" + Y['code'] + " " + Y['crn'] + "\t" + Y['teacher'] + "\t" + Y['type'] +"\n") #outfile.write("\t" + Y['code'] + " " + Y['crn'] + "\t" + Y['teacher'] + "\t" + Y['type'] +"\n")
outfile.write("\t" + Y['code'] + " " + Y['crn'] + "\t" + Y['teacher'] + "\t" + Y['type'] + "\t" + "\n") outfile.write("\t" + Y['code'] + " " + Y['crn'] + "\t" + Y['teacher'] + "\t" + Y['type'] + "\t" + "\n")
put_file('/home/public/schedule/', 'cache/', "%s_latestarts.txt" % term, 0)
return expanded return expanded
if __name__ == "__main__": if __name__ == "__main__":
@ -2180,6 +2181,7 @@ if __name__ == "__main__":
6: ['Canvas data: interactive sync', interactive ], 6: ['Canvas data: interactive sync', interactive ],
7: ['Canvas data: automated sync', sync_non_interactive ], 7: ['Canvas data: automated sync', sync_non_interactive ],
8: ['Scrape schedule from ssb', scrape_schedule_multi ], 8: ['Scrape schedule from ssb', scrape_schedule_multi ],
14: ['Generate latestart schedule', list_latestarts ],
9: ['Test ssb calls with python', scrape_schedule_py ], 9: ['Test ssb calls with python', scrape_schedule_py ],
10: ['schedule to db', scrape_for_db ], 10: ['schedule to db', scrape_for_db ],
11: ['clean argos draft schedule file', argos_data_from_cvc], 11: ['clean argos draft schedule file', argos_data_from_cvc],