mirror of
https://github.com/cqwu-ehall/cqwu-ehall.git
synced 2024-11-21 18:38:18 +00:00
🐛 Fix calendar model parse (#7)
Co-authored-by: brian <brian@xtaolabs.com>
This commit is contained in:
parent
f64e072552
commit
d2417fb906
@ -109,8 +109,11 @@ def parse_weeks_and_sections(text: str) -> Tuple[List[int], int, int]:
|
||||
if section_range.startswith("傍晚"):
|
||||
start_num = 9
|
||||
sections = 1
|
||||
else:
|
||||
elif "-" in section_range:
|
||||
start_num = int(section_range.split("-")[0])
|
||||
end = int(section_range.split("-")[1])
|
||||
sections = end - start_num + 1
|
||||
else:
|
||||
start_num = int(section_range)
|
||||
sections = 1
|
||||
return weeks_list, start_num, sections
|
||||
|
2
setup.py
2
setup.py
@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
||||
|
||||
setuptools.setup(
|
||||
name="cqwu", # 用自己的名替换其中的YOUR_USERNAME_
|
||||
version="0.0.7", # 包版本号,便于维护版本
|
||||
version="0.0.8", # 包版本号,便于维护版本
|
||||
author="omg-xtao", # 作者,可以写自己的姓名
|
||||
author_email="xtao@xtaolink.cn", # 作者联系方式,可写自己的邮箱地址
|
||||
description="A cqwu ehall client.", # 包的简述
|
||||
|
Loading…
Reference in New Issue
Block a user