Compare commits
4 Commits
2aee776bad
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| d8eabcb606 | |||
| 405d7ff3b9 | |||
| e7892a21a5 | |||
| 5500c55b71 |
10
CHANGELOG.md
10
CHANGELOG.md
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
6 种更新类别:Added、Changed、Deprecated、Removed、Fixed、Security。
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
等待中...
|
||||
|
||||
## [0.1.4] - 2026-04-26
|
||||
|
||||
### Fixed
|
||||
|
||||
- 修复从命令行运行 `njupt-suan-api init` 时由于 playwright 命令未找到而失败的问题。
|
||||
|
||||
## [0.1.3] - 2026-04-26
|
||||
|
||||
### Changed
|
||||
|
||||
21
LICENSE.txt
Normal file
21
LICENSE.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 MangoFanFanw
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
12
README.md
12
README.md
@@ -12,12 +12,12 @@ NJUPT Suan API 是一个 FastAPI 项目,目标在于实现对 NJUPT(南京
|
||||
|
||||
## 功能
|
||||
|
||||
| 计划功能(芒果画饼中) | 支持进度 |
|
||||
|---------------|---------------|
|
||||
| 教务系统 - 课程表获取 | ✅ |
|
||||
| 教务系统 - 课程获取 | ⌛️ |
|
||||
| 教务系统 - 成绩获取 | ⌛️ |
|
||||
| 体育部系统 - 早锻炼获取 | ⌛️(等待体育部系统修复) |
|
||||
| 计划功能(芒果画饼中) | 支持进度 |
|
||||
|---------------|------------------|
|
||||
| 教务系统 - 课程表获取 | ✅ |
|
||||
| 教务系统 - 课程获取 | ⌛️ |
|
||||
| 教务系统 - 成绩获取 | ⌛️ |
|
||||
| 体育部系统 - 早锻炼获取 | ❌(无从破解微信小程序 QAQ) |
|
||||
|
||||
## 运行
|
||||
|
||||
|
||||
@@ -1,9 +1,25 @@
|
||||
[project]
|
||||
name = "njupt-suan-api"
|
||||
version = "0.1.3"
|
||||
version = "0.1.5"
|
||||
description = "API and MCP server for NJUPT infomation ~"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.13"
|
||||
license = "MIT"
|
||||
|
||||
authors = [
|
||||
{ name = "MangoFanFanw", email = "mangofanfanw@icloud.com" }
|
||||
]
|
||||
|
||||
maintainers = [
|
||||
{ name = "MangoFanFanw", email = "mangofanfanw@icloud.com" }
|
||||
]
|
||||
|
||||
classifiers = [
|
||||
"Development Status :: 3 - Alpha",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
]
|
||||
|
||||
dependencies = [
|
||||
"aiofiles>=25.1.0",
|
||||
"beautifulsoup4>=4.14.3",
|
||||
@@ -23,6 +39,13 @@ dependencies = [
|
||||
"websockets>=16.0",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://suan.mangofanfan.cn"
|
||||
Documentation = "https://suan.mangofanfan.cn"
|
||||
Repository = "https://github.com/mangofanfan/NJUPT-Suan-API.git"
|
||||
Changelog = "https://github.com/mangofanfan/NJUPT-Suan-API/blob/master/CHANGELOG.md"
|
||||
Issues = "https://github.com/mangofanfan/NJUPT-Suan-API/issues"
|
||||
|
||||
[project.scripts]
|
||||
njupt-suan-api = "njupt_suan_api.manage:app"
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import subprocess
|
||||
import sys
|
||||
from secrets import token_urlsafe
|
||||
|
||||
import typer
|
||||
@@ -52,7 +53,10 @@ def main(
|
||||
CLI 入口回调,所有子命令执行前都会经过这里。
|
||||
可以在这里放全局初始化(如日志级别、环境检查)。
|
||||
"""
|
||||
pass # 没有 --version 时就正常放行,继续执行子命令
|
||||
# 没有 --version 时就正常放行,继续执行子命令
|
||||
console.print(
|
||||
"[bright_black]NJUPT Suan API 仍然处于极早期的阶段。如果遇到任何问题,请告诉芒果帆帆喵![/bright_black]\n"
|
||||
)
|
||||
|
||||
|
||||
@app.command()
|
||||
@@ -89,7 +93,7 @@ def init(force: bool = typer.Option(False, "--force", "-f", help="强制初始
|
||||
|
||||
# 3 执行 uv run playwright install chromium
|
||||
console.print("[bright_black]即将安装 playwright 的 chromium,这可能是耗时最长的部分。[/bright_black]")
|
||||
cp3 = subprocess.run(["playwright", "install", "chromium"], cwd=WORKSPACE_DIR)
|
||||
cp3 = subprocess.run([sys.executable, "-m", "playwright", "install", "chromium"], cwd=WORKSPACE_DIR)
|
||||
if cp3.returncode != 0:
|
||||
console.print("[yellow]运行 playwright install chromuim 失败,双是什么原因呢?[/yellow]")
|
||||
raise typer.Exit(code=cp3.returncode)
|
||||
|
||||
Reference in New Issue
Block a user