GithubHelp home page GithubHelp logo

rewired-gh / hitsz_course_schedule_ics_converter Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 1.0 193 KB

将哈工大(深圳)教务平台的课表转换为 ICS 文件

License: GNU General Public License v3.0

Jupyter Notebook 100.00%
calendar course hitsz ics jupyter-notebook python schedule

hitsz_course_schedule_ics_converter's Introduction

哈工大(深圳)ICS 课表生成

本项目无任何质量保障与技术支持,请您确保自己能读懂本项目的源码,方可使用。

功能介绍

  • 支持使用用户名与密码便捷登录,并自动获取所有课表生成需要的信息。
  • 支持自动推断学期开始日期。
  • 支持手动填写部分参数,当自动获取失败时仍可生成。
  • 支持考试日程。
  • 无隐私泄露顾虑,且源代码开放易读。

前置条件

初始化项目

  1. 执行 poetry install
  2. 将 Jupyter Notebook 的内核指定为 Poetry 环境。

配置

请修改 exp.ipynb 笔记本,并选择下面任意一种方法,设置参数:

方法 A:自动推断

  • SHOULD_INFER_SEMESTER:是否将学期自动设置为当前学期,请设置成 True

(推荐)方法 A1:用户名和密码

  • USERNAME:统一身份认证用户名(学号)。
  • PASSWORD:统一身份认证密码。

方法 A2:Cookie

  • COOKIE:访问 http://jw.hitsz.edu.cn 时使用的 cookie 字段,获取方法此处不作教学。

方法 B:手动指定

自己使用浏览器抓包,将对于路径 http://jw.hitsz.edu.cn/xszykb/queryxszykbzong 的请求进行捕获或回放,然后把得到的 JSON 文件放在 ./general_schedule.json

  • REQUEST_DATA:指定学年和学期,请仿照 REQUEST_DATA_EXAMPLE 进行设置。
  • START_DATE:该学期开始日期。
  • SHOULD_INFER_SEMESTER:请设置成 False
  • CALENDAR_NAME:ICS 文件名。
  • ALARMS:日程提醒,如不需要提醒可设置为空列表。

运行

打开 Jupyter Notebook exp.ipynb,然后运行所有 cells,最终会在项目目录下生成一个 ICS 文件。关于 Jupyter Notebook 的使用方法此处不作教学。

hitsz_course_schedule_ics_converter's People

Contributors

rewired-gh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

maxwelljay256

hitsz_course_schedule_ics_converter's Issues

地点与教师匹配不严谨

应仅排除「满足方括号条件,且括号内以 [0-9][周节] 结尾的」。若按现在的方法匹配,则会在以「第」开头,或者以「周」「节」结尾的人名或地名出现错误。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.