README: TUI 文档; LICENSE: MIT

This commit is contained in:
lou
2026-08-10 14:46:24 +08:00
parent 8dc21dbe21
commit 11eaea2d35
2 changed files with 67 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 edgevoid
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.
+46
View File
@@ -0,0 +1,46 @@
# 7z-encrypt-tui 终端界面
7z-encrypt 文件安全传输系统的终端界面。**Python TUI** (input() REPL)——原生支持中文输入法, 不需要图形环境, SSH 也能用。
```
主菜单
1. 上传文件 (7z 压缩 → 加密 → 分卷 → 上传)
2. 任务续传 (断点续传: 只补传缺失卷)
3. 配置 (服务器地址 / token)
4. 文件列表 (ls + 空间配额)
5. 下载文件 (逐卷下载 → 本地解密 → 解压还原)
6. 删除文件 (先 ls 再选 file_id)
q. 退出
```
## 使用
```bash
python3 scripts/tui.py
```
- 服务器地址自动补 `http://` 前缀, 默认从客户端 config.json 读
- 路径输入自动剥引号 (复制路径常带 ' 或 ")
- 上传成功自动清理临时产物, 失败保留可续传
- 所有耗时操作有 tqdm 进度条 (上传卷条 / 下载双层条 / 加密 / 解密)
## 依赖
- 客户端项目: `/home/lou/文档/7z-encrypt` (7 模块 + .venv)
- tqdm
## 架构
```
tui.py
├─ run() 子进程调 7z-encrypt CLI (cwd=客户端目录, 实时透传输出)
├─ upload() 1/3 7z压缩 → 2/3 加密分卷 → 3/3 上传 → 清理
├─ download() 逐卷下载 + --decrypt 本地解密解压
├─ files_list() ls + 配额
├─ delete_file() ls 展示 → 输 file_id 删除
└─ config() 服务器/token 配置 (调 config.py)
```
## 协议
MIT License, Copyright (c) 2026 edgevoid