Skip to content

Commit b1beb8c

Browse files
committed
Merge branch 'dev'
2 parents 6b5fe42 + aec4f9e commit b1beb8c

40 files changed

+3191
-0
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,11 @@ venv.bak/
102102

103103
# mypy
104104
.mypy_cache/
105+
106+
# venv
107+
/venv
108+
109+
# eclipse
110+
.project
111+
.pydevproject
112+
.settings/

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
language: python
2+
sudo: true
3+
python:
4+
- "3.5"
5+
- "3.6"
6+
install:
7+
- pip install -r requirements.txt
8+
script: True

MANIFEST.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Include the README
2+
include *.md
3+
4+
# Include the license file
5+
include LICENSE

README.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
[![Build Status](https://travis-ci.com/ZhaoQi99/SNNU-SDK.svg?branch=master)](https://travis-ci.com/ZhaoQi99/SNNU-SDK/master)
2+
[![image](https://img.shields.io/pypi/v/snnusdk.svg)](https://pypi.org/project/snnusdk/)
3+
[![Release](https://img.shields.io/github/release/ZhaoQi99/SNNU-SDK.svg)](https://github.com/ZhaoQi99/SNNU-SDK/releases)
4+
[![image](https://img.shields.io/pypi/pyversions/snnusdk.svg)](https://pypi.org/project/snnusdk/)
5+
[![Documentation Status](https://readthedocs.org/projects/snnu-sdk/badge/?version=master)](https://snnu-sdk.readthedocs.io/zh_CN/dev/?badge=master)
6+
[![GitHub license](https://img.shields.io/github/license/ZhaoQi99/SNNU-SDK.svg)](https://github.com/ZhaoQi99/SNNU-SDK/blob/dev/LICENSE)
7+
8+
9+
# 陕西师范大学(SNNU) 第三方Python SDK
10+
---
11+
SNNU-SDK 是陕西师范大学(SNNU)的一个第三方Python-SDK,实现了校内常用服务如教务处、图书馆、校园卡、教室查询等接口的Python封装。
12+
13+
## 功能
14+
### Urp教务系统
15+
- 本学期课表
16+
- 历年课表
17+
- 本学期成绩
18+
- 历年考试成绩
19+
- 必修课绩点
20+
21+
### 图书馆
22+
- 基本信息
23+
- 在借书籍
24+
- 预约书籍
25+
- 现金事务
26+
- 挂失、解挂图书证
27+
- 预约到馆信息
28+
29+
### 教室
30+
- 某教学楼的所有教室号
31+
- 某教学楼某周的所有教室的状态
32+
- 某教学楼某周某一教室的状态
33+
34+
### 校园卡
35+
- 校园卡消费明细
36+
- 校园卡余额
37+
38+
## 安装
39+
40+
```bash
41+
pip install snnusdk
42+
✨🍰✨
43+
44+
```
45+
## 使用示例
46+
这里是一些简单的使用案例
47+
```Python
48+
from snnusdk import Urp
49+
urp = Urp(account='B11111111', password='xxx')
50+
51+
>>> urp.getCourses()
52+
[
53+
{
54+
'id': '1241416',
55+
'name': '算法设计与分析',
56+
'number': '01',
57+
'credits': 3.0,
58+
'attributes': '必修',
59+
'teacher': '王小明*',
60+
'status': '置入',
61+
'info': [
62+
{
63+
'week': '1-18周上',
64+
'day': '2',
65+
'timeOfClass': '1',
66+
'numOfClass': '2',
67+
'campus': '长安校区',
68+
'buildings': '长安文津楼',
69+
'room': '1511'
70+
}
71+
]
72+
}
73+
]
74+
75+
from snnusdk import Libiary
76+
libiary = Library(username='B11111111', password='xxx')
77+
78+
>>> library.getInfo()
79+
{
80+
'帐号ID': '2016xxxxx',
81+
'姓名': '张三',
82+
'昵称': 'xx',
83+
'登录次数': '123',
84+
'状态': '正常'
85+
}
86+
```
87+
88+
## 文档
89+
你可以在[https://ZhaoQi99.github.io/SNNU-SDK](https://ZhaoQi99.github.io/SNNU-SDK)看到本项目的完整使用文档。
90+
91+
## 贡献你的代码
92+
欢迎您贡献出自己的一份力量,你可以随时提交`issue``fork`本仓库,静候你的`pull request`
93+
94+
## 贡献者
95+
感谢所有对本项目做出过贡献的开发者([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
96+
97+
98+
| [<img src="https://avatars3.githubusercontent.com/u/40024866?v=4" width="100px;"/><br /><sub><b>jhy</b></sub>](https://Small-funny.github.io/)<br />[💻](https://github.com/ZhaoQi99/SNNU-SDK/commits?author=Small-funny "Code") [📖](https://github.com/ZhaoQi99/SNNU-SDK/commits?author=Small-funny "Documentation")|
99+
| :---: |
100+
101+
## 谁在使用
102+
103+
## 开源协议 & 作者
104+
* 作者:Qi Zhao([[email protected]](mailto:[email protected]))
105+
* 开源协议:[GNU General Public License v3.0](https://github.com/ZhaoQi99/SNNU-SDK/blob/dev/LICENSE)

docs/Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SOURCEDIR = source
8+
BUILDDIR = ../../SNNU-SDk-docs
9+
10+
# Put it first so that "make" without argument is like "make help".
11+
help:
12+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
13+
14+
.PHONY: help Makefile
15+
16+
# Catch-all target: route all unknown targets to Sphinx using the new
17+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
18+
%: Makefile
19+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=../../SNNU-SDk-docs
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
33+
34+
:end
35+
popd

docs/source/_static/logo.jpg

8.32 KB
Loading

docs/source/campus.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
************
2+
校园卡接口
3+
************
4+
5+
.. autoclass:: snnusdk.Campus
6+
:members:
7+
8+

docs/source/campus_example.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
**************
2+
校园卡接口示例
3+
**************
4+
5+
wait
6+
7+

docs/source/changes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Changelog
2+
====================

0 commit comments

Comments
 (0)