-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
3,191 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,3 +102,11 @@ venv.bak/ | |
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
# venv | ||
/venv | ||
|
||
# eclipse | ||
.project | ||
.pydevproject | ||
.settings/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
language: python | ||
sudo: true | ||
python: | ||
- "3.5" | ||
- "3.6" | ||
install: | ||
- pip install -r requirements.txt | ||
script: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Include the README | ||
include *.md | ||
|
||
# Include the license file | ||
include LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
[![Build Status](https://travis-ci.com/ZhaoQi99/SNNU-SDK.svg?branch=master)](https://travis-ci.com/ZhaoQi99/SNNU-SDK/master) | ||
[![image](https://img.shields.io/pypi/v/snnusdk.svg)](https://pypi.org/project/snnusdk/) | ||
[![Release](https://img.shields.io/github/release/ZhaoQi99/SNNU-SDK.svg)](https://github.com/ZhaoQi99/SNNU-SDK/releases) | ||
[![image](https://img.shields.io/pypi/pyversions/snnusdk.svg)](https://pypi.org/project/snnusdk/) | ||
[![Documentation Status](https://readthedocs.org/projects/snnu-sdk/badge/?version=master)](https://snnu-sdk.readthedocs.io/zh_CN/dev/?badge=master) | ||
[![GitHub license](https://img.shields.io/github/license/ZhaoQi99/SNNU-SDK.svg)](https://github.com/ZhaoQi99/SNNU-SDK/blob/dev/LICENSE) | ||
|
||
|
||
# 陕西师范大学(SNNU) 第三方Python SDK | ||
--- | ||
SNNU-SDK 是陕西师范大学(SNNU)的一个第三方Python-SDK,实现了校内常用服务如教务处、图书馆、校园卡、教室查询等接口的Python封装。 | ||
|
||
## 功能 | ||
### Urp教务系统 | ||
- 本学期课表 | ||
- 历年课表 | ||
- 本学期成绩 | ||
- 历年考试成绩 | ||
- 必修课绩点 | ||
|
||
### 图书馆 | ||
- 基本信息 | ||
- 在借书籍 | ||
- 预约书籍 | ||
- 现金事务 | ||
- 挂失、解挂图书证 | ||
- 预约到馆信息 | ||
|
||
### 教室 | ||
- 某教学楼的所有教室号 | ||
- 某教学楼某周的所有教室的状态 | ||
- 某教学楼某周某一教室的状态 | ||
|
||
### 校园卡 | ||
- 校园卡消费明细 | ||
- 校园卡余额 | ||
|
||
## 安装 | ||
|
||
```bash | ||
pip install snnusdk | ||
✨🍰✨ | ||
|
||
``` | ||
## 使用示例 | ||
这里是一些简单的使用案例 | ||
```Python | ||
from snnusdk import Urp | ||
urp = Urp(account='B11111111', password='xxx') | ||
|
||
>>> urp.getCourses() | ||
[ | ||
{ | ||
'id': '1241416', | ||
'name': '算法设计与分析', | ||
'number': '01', | ||
'credits': 3.0, | ||
'attributes': '必修', | ||
'teacher': '王小明*', | ||
'status': '置入', | ||
'info': [ | ||
{ | ||
'week': '1-18周上', | ||
'day': '2', | ||
'timeOfClass': '1', | ||
'numOfClass': '2', | ||
'campus': '长安校区', | ||
'buildings': '长安文津楼', | ||
'room': '1511' | ||
} | ||
] | ||
} | ||
] | ||
|
||
from snnusdk import Libiary | ||
libiary = Library(username='B11111111', password='xxx') | ||
|
||
>>> library.getInfo() | ||
{ | ||
'帐号ID': '2016xxxxx', | ||
'姓名': '张三', | ||
'昵称': 'xx', | ||
'登录次数': '123', | ||
'状态': '正常' | ||
} | ||
``` | ||
|
||
## 文档 | ||
你可以在[https://ZhaoQi99.github.io/SNNU-SDK](https://ZhaoQi99.github.io/SNNU-SDK)看到本项目的完整使用文档。 | ||
|
||
## 贡献你的代码 | ||
欢迎您贡献出自己的一份力量,你可以随时提交`issue`或`fork`本仓库,静候你的`pull request`。 | ||
|
||
## 贡献者 | ||
感谢所有对本项目做出过贡献的开发者([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)): | ||
|
||
|
||
| [<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")| | ||
| :---: | | ||
|
||
## 谁在使用 | ||
|
||
## 开源协议 & 作者 | ||
* 作者:Qi Zhao([[email protected]](mailto:[email protected])) | ||
* 开源协议:[GNU General Public License v3.0](https://github.com/ZhaoQi99/SNNU-SDK/blob/dev/LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = | ||
SPHINXBUILD = sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = ../../SNNU-SDk-docs | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=../../SNNU-SDk-docs | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.http://sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% | ||
|
||
:end | ||
popd |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
************ | ||
校园卡接口 | ||
************ | ||
|
||
.. autoclass:: snnusdk.Campus | ||
:members: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
************** | ||
校园卡接口示例 | ||
************** | ||
|
||
wait | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Changelog | ||
==================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file does only contain a selection of the most common options. For a | ||
# full list see the documentation: | ||
# http://www.sphinx-doc.org/en/master/config | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# | ||
import os | ||
import sys | ||
sys.path.insert(0, os.path.abspath('./../../')) | ||
|
||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = 'SNNU-SDK' | ||
copyright = '2018, QiZhao' | ||
author = 'QiZhao' | ||
|
||
# The short X.Y version | ||
version = '' | ||
# The full version, including alpha/beta/rc tags | ||
release = 'latest' | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
# If your documentation needs a minimal Sphinx version, state it here. | ||
# | ||
# needs_sphinx = '1.0' | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = [ | ||
'sphinx.ext.autodoc', | ||
'sphinx.ext.viewcode', | ||
'sphinx.ext.githubpages', | ||
] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
# The suffix(es) of source filenames. | ||
# You can specify multiple suffix as a list of string: | ||
# | ||
# source_suffix = ['.rst', '.md'] | ||
source_suffix = '.rst' | ||
|
||
# The master toctree document. | ||
master_doc = 'index' | ||
|
||
# The language for content autogenerated by Sphinx. Refer to documentation | ||
# for a list of supported languages. | ||
# | ||
# This is also used if you do content translation via gettext catalogs. | ||
# Usually you set "language" from the command line for these cases. | ||
language = 'zh_CN' | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path. | ||
exclude_patterns = [] | ||
|
||
# The name of the Pygments (syntax highlighting) style to use. | ||
pygments_style = None | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
html_theme = 'sphinx_rtd_theme' | ||
|
||
# Theme options are theme-specific and customize the look and feel of a theme | ||
# further. For a list of options available for each theme, see the | ||
# documentation. | ||
# | ||
# html_theme_options = {} | ||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
html_static_path = ['_static'] | ||
|
||
# Custom sidebar templates, must be a dictionary that maps document names | ||
# to template names. | ||
# | ||
# The default sidebars (for documents that don't match any pattern) are | ||
# defined by theme itself. Builtin themes are using these templates by | ||
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', | ||
# 'searchbox.html']``. | ||
# | ||
# html_sidebars = {} | ||
|
||
# -- Options for HTMLHelp output --------------------------------------------- | ||
|
||
# Output file base name for HTML help builder. | ||
htmlhelp_basename = 'SNNU-SDKdoc' | ||
|
||
|
||
# -- Options for LaTeX output ------------------------------------------------ | ||
|
||
latex_elements = { | ||
# The paper size ('letterpaper' or 'a4paper'). | ||
# | ||
# 'papersize': 'letterpaper', | ||
|
||
# The font size ('10pt', '11pt' or '12pt'). | ||
# | ||
# 'pointsize': '10pt', | ||
|
||
# Additional stuff for the LaTeX preamble. | ||
# | ||
# 'preamble': '', | ||
|
||
# Latex figure (float) alignment | ||
# | ||
# 'figure_align': 'htbp', | ||
} | ||
|
||
# Grouping the document tree into LaTeX files. List of tuples | ||
# (source start file, target name, title, | ||
# author, documentclass [howto, manual, or own class]). | ||
latex_documents = [ | ||
(master_doc, 'SNNU-SDK.tex', 'SNNU-SDK Documentation', | ||
'QiZhao', 'manual'), | ||
] | ||
|
||
|
||
# -- Options for manual page output ------------------------------------------ | ||
|
||
# One entry per manual page. List of tuples | ||
# (source start file, name, description, authors, manual section). | ||
man_pages = [ | ||
(master_doc, 'snnu-sdk', 'SNNU-SDK Documentation', | ||
[author], 1) | ||
] | ||
|
||
|
||
# -- Options for Texinfo output ---------------------------------------------- | ||
|
||
# Grouping the document tree into Texinfo files. List of tuples | ||
# (source start file, target name, title, author, | ||
# dir menu entry, description, category) | ||
texinfo_documents = [ | ||
(master_doc, 'SNNU-SDK', 'SNNU-SDK Documentation', | ||
author, 'SNNU-SDK', 'One line description of project.', | ||
'Miscellaneous'), | ||
] | ||
|
||
|
||
# -- Options for Epub output ------------------------------------------------- | ||
|
||
# Bibliographic Dublin Core info. | ||
epub_title = project | ||
|
||
# The unique identifier of the text. This can be a ISBN number | ||
# or the project homepage. | ||
# | ||
# epub_identifier = '' | ||
|
||
# A unique identification for the text. | ||
# | ||
# epub_uid = '' | ||
|
||
# A list of files that should not be packed into the epub file. | ||
epub_exclude_files = ['search.html'] | ||
|
||
|
||
# -- Extension configuration ------------------------------------------------- | ||
html_logo = "_static/logo.jpg" | ||
html_show_sourcelink = False | ||
autodoc_member_order="bysource" |
Oops, something went wrong.