https://github.com/do1e/njucharge-backend
南哪充电后端(其实也有前端示例)
https://github.com/do1e/njucharge-backend
nanjing-university nju
Last synced: 6 months ago
JSON representation
南哪充电后端(其实也有前端示例)
- Host: GitHub
- URL: https://github.com/do1e/njucharge-backend
- Owner: Do1e
- License: mit
- Created: 2024-09-29T08:53:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-22T10:03:56.000Z (8 months ago)
- Last Synced: 2025-04-14T07:09:43.521Z (6 months ago)
- Topics: nanjing-university, nju
- Language: HTML
- Homepage: https://www.do1e.cn/charge.html
- Size: 85 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 南大充电桩状态-后端
## 使用
运行`main.py`即可,将最新状态更新到`status.json`中。
* `utils/per_station.py`用于获取每个充电站点的插座ID,一般不会更新而且需要`token`验证所以在`main.py`中注释掉了。
* `utils/per_outlet.py`可获取每个插座的状态。`sort_outlets.py`用于读取`status.json`并按照插座剩余时间排序。
查看实例HTML:
1. 在命令行启动一个http服务器:`python -m http.server 8000`
2. 访问`http://localhost:8000/example1.html` 或 `http://localhost:8000/example2.html`