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

Fix tkgui.py #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 4 additions & 3 deletions cqu_timetable_new/tkgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@
filetypes=['*.xlsx', '*.json', '*'], default='*.xlsx')
if not inputFile:
sys.exit()
dateStr = easygui.enterbox("输入开学时间(必须是周一),例:20210301",
title="输入开学时间", default="20210301")
dateStr = easygui.enterbox("输入开学时间(必须是周一),例:20220214",
title="输入开学时间", default="20220214")

try:
ics = mkical(
(loadIO_from_xlsx if inputFile[-5:].lower()
== '.xlsx' else loadIO_from_json)(inputFile),
date(
int(dateStr[:4]), int(dateStr[4:6]), int(dateStr[6:])))
int(dateStr[:4]), int(dateStr[4:6]), int(dateStr[6:])),0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最好还是给出对应可操作选项,直接预设值可能不太妥当

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,感谢建议!

except Exception:
easygui.exceptionbox("请检查输入是否有误")
sys.exit()
Expand Down