ChatNet 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,115 @@
1
+ Metadata-Version: 2.4
2
+ Name: ChatNet
3
+ Version: 0.1.0
4
+ Summary: ChatArch network and campus-network CLI
5
+ Author-email: ChatArch <1073853456@qq.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/ChatArch/ChatNet
8
+ Project-URL: Repository, https://github.com/ChatArch/ChatNet
9
+ Project-URL: Documentation, https://ChatArch.github.io/ChatNet
10
+ Keywords: chatnet,chatarch,cli
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: click>=8.0
17
+ Requires-Dist: chatstyle>=0.1.0
18
+ Requires-Dist: chatenv>=0.1.1
19
+ Requires-Dist: requests>=2.0
20
+ Requires-Dist: pycryptodome>=3.0
21
+ Provides-Extra: captcha
22
+ Requires-Dist: ddddocr; extra == "captcha"
23
+ Requires-Dist: numpy; extra == "captcha"
24
+ Requires-Dist: pillow; extra == "captcha"
25
+ Provides-Extra: dev
26
+ Requires-Dist: build; extra == "dev"
27
+ Requires-Dist: pytest; extra == "dev"
28
+ Requires-Dist: twine; extra == "dev"
29
+ Provides-Extra: docs
30
+ Requires-Dist: mkdocs>=1.4.0; extra == "docs"
31
+ Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
32
+ Requires-Dist: mike>=2.0.0; extra == "docs"
33
+ Dynamic: license-file
34
+
35
+ <div align="center">
36
+ <a href="https://pypi.python.org/pypi/ChatNet">
37
+ <img src="https://img.shields.io/pypi/v/ChatNet.svg" alt="PyPI version" />
38
+ </a>
39
+ <a href="https://github.com/ChatArch/ChatNet/actions/workflows/ci.yml">
40
+ <img src="https://github.com/ChatArch/ChatNet/actions/workflows/ci.yml/badge.svg" alt="Tests" />
41
+ </a>
42
+ <a href="https://ChatArch.github.io/ChatNet">
43
+ <img src="https://img.shields.io/badge/docs-mkdocs-blue.svg" alt="Documentation" />
44
+ </a>
45
+ </div>
46
+
47
+ <div align="center">
48
+
49
+ [English](README.en.md) | [简体中文](README.md)
50
+ </div>
51
+
52
+ # ChatNet
53
+
54
+ ChatNet 是 ChatArch 系列的网络与校园网 CLI,当前提供 ECNU 自助服务平台登录、查询和访客管理能力。
55
+
56
+ ## 快速开始
57
+
58
+ ```bash
59
+ pip install -e ".[dev]"
60
+ chatnet hello ChatArch
61
+ chatnet ecnu selftest
62
+ python -m pytest -q
63
+ python -m build
64
+ ```
65
+
66
+ ## ECNU CLI
67
+
68
+ ECNU 自助服务平台能力统一挂在 `chatnet ecnu` 下,覆盖登录、会话、日志查询和访客管理。
69
+
70
+ 默认配置使用 chatenv 规范,位于 `~/.chatarch/envs/ECNU/.env`:
71
+
72
+ ```bash
73
+ chatenv cat -t ecnu
74
+ ```
75
+
76
+ ```bash
77
+ chatnet ecnu login-init
78
+ chatnet ecnu login --username "$ECNU_USERNAME" --password "$ECNU_PASSWORD" --captcha ABCD
79
+ chatnet ecnu home
80
+ chatnet ecnu auth-log --limit 10
81
+ chatnet ecnu visitor list
82
+ chatnet ecnu visitor create --remark GuestB
83
+ chatnet ecnu visitor update --id 10256703 --remark GuestB --password 'Temp!235'
84
+ ```
85
+
86
+ 自动验证码登录依赖可选 OCR extra:
87
+
88
+ ```bash
89
+ pip install -e ".[captcha]"
90
+ chatnet ecnu login-auto --username "$ECNU_USERNAME" --password "$ECNU_PASSWORD"
91
+ ```
92
+
93
+ 缺少可恢复参数时,命令会按 ChatArch 规范进入交互补问;`-i` 强制交互,`-I` 禁止交互并快速失败。密码、Cookie、短信验证码等敏感值不要写入文档或提交记录。
94
+
95
+ 完整使用文档见 [`docs/ecnu.md`](docs/ecnu.md)。
96
+
97
+ ## CLI 规范
98
+
99
+ 这个模板默认依赖 `chatstyle>=0.1.0` 和 `chatenv>=0.1.1`,新的命令应优先使用:
100
+
101
+ - `CommandSchema` / `CommandField` 描述输入。
102
+ - `add_interactive_option()` 提供统一 `-i/-I`。
103
+ - `resolve_command_inputs()` 统一缺参补问、默认值、TTY 与校验。
104
+
105
+ ## 目录结构
106
+
107
+ - `src/`:包源码
108
+ - `tests/code-tests/`:代码测试和历史测试迁移
109
+ - `tests/cli-tests/`:真实 CLI 测试,doc-first
110
+ - `tests/mock-cli-tests/`:mock/fake CLI 测试,doc-first
111
+ - `docs/`:长期维护文档,由 mkdocs 构建
112
+
113
+ ## 开发说明
114
+
115
+ 扩展脚手架前,先阅读 `DEVELOP.md` 和 `AGENTS.md`。
@@ -0,0 +1,13 @@
1
+ chatnet/__init__.py,sha256=Czzav79C9bPx5XO2OZ6SztrdlxTh0FdbcbgdkeAgHgQ,97
2
+ chatnet/cli.py,sha256=JiptAlPUDmltnIECRYmUIymYSR0i_dm7Z5l4in1w1CQ,1455
3
+ chatnet/config.py,sha256=_RT6j-ueCSxykOvwPDQgpIwWkhuC9xdG_IyJYj2ayJ0,738
4
+ chatnet/ecnu/__init__.py,sha256=kzcbWTwU9P6bhh5_nwwwr0R4TnN7etLxzoF6AkvB664,140
5
+ chatnet/ecnu/captcha.py,sha256=bYuhLpkbaIUBign73K63zQHDjn-MTFzL7GxLHY5EyHE,7165
6
+ chatnet/ecnu/cli.py,sha256=QHrD6KjmPfKnLcQiZKx-Oz3EHGfX05Fg2KXNRgU8jOI,14393
7
+ chatnet/ecnu/portal.py,sha256=irt6VEqoY2n_AsJmke_4b-6kpy_T0Mu-8-s16RjyqQ0,30213
8
+ chatnet-0.1.0.dist-info/licenses/LICENSE,sha256=G-fJLQ4pkXXISE3qeN8J5Cw5VRoNongA0hbsHA9TRe8,1065
9
+ chatnet-0.1.0.dist-info/METADATA,sha256=il_VlCMwD0EJYUcekAHKbIGueW3zC42OmqsqBXJ0s9U,3706
10
+ chatnet-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
11
+ chatnet-0.1.0.dist-info/entry_points.txt,sha256=xAGtlquufWB8cGGxourBjDNT2hVRaib_kuoJZkdGeBo,89
12
+ chatnet-0.1.0.dist-info/top_level.txt,sha256=JvC9sGYXdCDF5LzbxdBXg83Vgb1RtOGPrK9Wa-440qA,8
13
+ chatnet-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,5 @@
1
+ [chatenv.configs]
2
+ chatnet = chatnet.config
3
+
4
+ [console_scripts]
5
+ chatnet = chatnet.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ChatArch
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ chatnet