From 11eaea2d3516ccd7f105744743e09688b32c7566 Mon Sep 17 00:00:00 2001 From: lou Date: Mon, 10 Aug 2026 14:46:24 +0800 Subject: [PATCH] =?UTF-8?q?README:=20TUI=20=E6=96=87=E6=A1=A3;=20LICENSE:?= =?UTF-8?q?=20MIT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE | 21 +++++++++++++++++++++ README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..4729f38 --- /dev/null +++ b/LICENSE @@ -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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..8db26c6 --- /dev/null +++ b/README.md @@ -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