Add PostgreSQL-backed DuckMail GUI

This commit is contained in:
52tv
2026-03-20 17:24:48 +08:00
commit 3fe6390250
7 changed files with 1165 additions and 0 deletions

76
README.md Normal file
View File

@@ -0,0 +1,76 @@
# DuckMail GUI (PySide6)
一个基于 PySide6 的 DuckMail 邮箱创建与收信工具。
当前版本改为纯 PostgreSQL 账号源:
- 账号列表直接从 PostgreSQL `registered_accounts` 读取
- 创建邮箱后直接写入 PostgreSQL
- 导入账号并获取 Token 后直接写入 PostgreSQL
- 界面采用分页布局,日常使用时只看账号页即可
## 安装依赖
```bash
pip install -r requirements.txt
```
## 启动
```bash
python gui.py
```
## 页面说明
### 账号页
- 搜索账号
- 查看账号列表
- 查看账号详情
- 获取邮件
- 查看邮件正文
- 查看日志
### 设置页
- DuckMail API 配置
- PostgreSQL 连接配置
- 自动刷新配置
- 导入账号并写入数据库
- 创建邮箱并写入数据库
## PostgreSQL 表结构
默认读取并写入表:`registered_accounts`
默认字段:
- `email`
- `mail_password`
- `mail_token`
- `chatgpt_password`
- `name`
- `birthdate`
- `created_at`
其中 `email` 需要能作为唯一键或主键,以支持 `on conflict (email) do update`
## 配置说明
程序会将界面配置保存到 `config_gui.json`,包括:
- DuckMail API Base
- Domain
- Bearer
- Proxy
- 自动刷新开关与间隔
- PostgreSQL Host / Port / DB / User / Password
## requirements
当前依赖:
- `PySide6`
- `requests`
- `psycopg[binary]`