Skip to content

Commit

Permalink
Create project.
Browse files Browse the repository at this point in the history
  • Loading branch information
Void-JackLee committed Jun 30, 2021
1 parent d7eb142 commit ee8897c
Show file tree
Hide file tree
Showing 400 changed files with 37,985 additions and 1 deletion.
Binary file added .DS_Store
Binary file not shown.
5 changes: 5 additions & 0 deletions .idea/.gitignore

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

12 changes: 12 additions & 0 deletions .idea/ZFCourseTakingAssistant.iml

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

8 changes: 8 additions & 0 deletions .idea/modules.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

52 changes: 51 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,52 @@
# ZFCourseTakeAssistant
# ZFCourseTakingAssistant
A script for Chinese University Student grabing courses with Zheng Fang Educational administration system.

一款面向正方教学一体化教育服务系统的抢课脚本。

# Features

* 支持一键抢课(提前进入网站,预先选好要的课程,到了抢课的时间一键抢课)
* 支持捡漏(可以自动反复抢列表里的课)

> **程序仅供交流学习,请勿用作非法用途**
# Applicable

本脚本适用于**正方教学一体化教育服务系统**

![主界面](pic/main.png)

目前仅测试过**浙江中医药大学**的教务系统,欢迎其他学校的同学测试后提交issue。

## Environment

* Google Chrome
* Tampermonkey

建议使用安装了Tampermonkey(油猴脚本插件)的谷歌浏览器,其他浏览器没有测试过不敢保证稳定性。

## Usage

1. 安装油猴子,安装本脚本[https://raw.githubusercontent.com/Void-JackLee/ZFCourseTakingAssistant/main/抢课脚本.user.js](https://raw.githubusercontent.com/Void-JackLee/ZFCourseTakingAssistant/main/%E6%8A%A2%E8%AF%BE%E5%8A%A9%E6%89%8B.user.js)

2. 访问你的选课网址,待他加载完毕后如图所示。(可以按F12打开控制台查看详情)![食用方法](pic/usage.jpg)

**已知问题:如果过了好久都没显示,刷新即可,如果刷新也不行,则新建一个标签页,把网址复制进去打开,目前怀疑是缓存问题。**

# Development

## Environment

* Unix Base System(Linux/Unix/macOS)
* WebStorm
* node.js
* webpack
* css-loader
* style-loader

## Build

Run `build.py` script in project folder to build.



59 changes: 59 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/python3

#
# build.py
# 抢课助手
#
# Created by 李弘辰 on 2021/6/30.
# Copyright © 2021 李弘辰. All rights reserved.
# Learn more on website https://void-lee.cn
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#

import json
import os

print('Building by webpack...')
os.system('webpack')
print('Converting to Tampermonkey script...')

f = open('package.json','r',encoding='utf8')
info = json.load(f)
f.close()

header = """// ==UserScript==
// @name 抢课助手
// @namespace https://void-lee.cn
// @version """ + info["version"] + """
// @description """ + info["description"] + """
// @author VoidJackLee
// @match */jwglxt/xsxk/zzxkyzb_cxZzxkYzbIndex.html*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
"""

print(header)

f = open('dist.js','r',encoding='utf8')
f2 = open('抢课助手.user.js','w',encoding='utf8')
f2.write(header)
for lines in f:
f2.write(lines)

f.close()
f2.close()
print('Done!')
1 change: 1 addition & 0 deletions dist.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions node_modules/@types/json-schema

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

21 changes: 21 additions & 0 deletions node_modules/_@[email protected]@@types/json-schema/LICENSE

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

16 changes: 16 additions & 0 deletions node_modules/_@[email protected]@@types/json-schema/README.md

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

Loading

0 comments on commit ee8897c

Please sign in to comment.