Skip to content

Commit

Permalink
Update code to fix error caused by comcigan changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hegelty committed Mar 13, 2024
1 parent 28a7985 commit ea53185
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/pycomcigan.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions pycomcigan/timetable.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ def __init__(self,
resp = resp.text.split('\n')[0]
resp = json.loads(resp)

with open('timetable.json', 'w', encoding='UTF-8') as f:
f.write(json.dumps(resp, ensure_ascii=False, indent=4))

self.school_code = school_code
self.school_name = school_name
self.local_code = local_code
Expand Down Expand Up @@ -142,13 +145,13 @@ def __init__(self,
data[grade][cls][day].append(
TimeTableData(
period=period,
subject=sub_list[period_num % 100],
teacher=teacher_list[period_num // 100],
subject=sub_list[period_num // 1000],
teacher=teacher_list[period_num % 100],
replaced=period_num != original_period,
original=None if period_num == original_period else Lecture(
period=period,
subject=sub_list[original_period % 100],
teacher=teacher_list[original_period // 100]
subject=sub_list[original_period // 1000],
teacher=teacher_list[original_period % 100]
)
)
)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="pycomcigan",
version="1.1.0",
version="1.2.0",
author="hegelty",
author_email="[email protected]",
description="컴시간알리미 시간표 파싱 라이브러리입니다.",
Expand Down

0 comments on commit ea53185

Please sign in to comment.