29 Commits

Author SHA1 Message Date
MikiVL
2c649b8c7c 添加 GitHub Actions 自动构建 Windows/macOS 安装包
Some checks failed
Build Windows Installer / build-windows (push) Has been cancelled
构建安装包 / build-windows (push) Has been cancelled
构建安装包 / build-mac (push) Has been cancelled
每次推送 main 分支或手动触发时,分别在
windows-latest 和 macos-latest 上打包 Python 可执行文件
并生成 Electron 安装包,产物上传为 Artifact 保留 30 天。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 11:42:40 +08:00
MikiVL
6b2c87dc18 修复 Windows 编码问题导致生成失败
Windows 默认编码为 GBK,Python stdout 输出含中文的 JSON 时
Node.js 端无法正确解析,导致批量生成操作静默失败。

- python/main.py:启动时强制 stdin/stdout 使用 UTF-8
- templateIpc.js:spawn 传入 PYTHONUTF8=1,改用 Buffer 拼接后 UTF-8 解码

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 11:41:55 +08:00
MikiVL
a4d1218d21 fix: 显式安装 tailwindcss/oxide Windows 原生绑定
Some checks are pending
Build Windows Installer / build-windows (push) Waiting to run
2026-05-07 01:22:50 +08:00
MikiVL
df2488c653 fix: 构建前删除 package-lock.json,让 Windows 重新解析 tailwindcss 原生绑定
Some checks are pending
Build Windows Installer / build-windows (push) Waiting to run
2026-05-07 01:04:27 +08:00
MikiVL
ec105b3828 fix: 修复 Windows 构建中 tailwindcss 原生绑定找不到的问题,改用 npm install 替代 npm ci
Some checks are pending
Build Windows Installer / build-windows (push) Waiting to run
2026-05-06 23:59:52 +08:00
MikiVL
cb2c186f7f 添加 GitHub Actions Windows 构建流程
Some checks are pending
Build Windows Installer / build-windows (push) Waiting to run
- 新增 .github/workflows/build-windows.yml,在 windows-latest runner 上构建 NSIS 安装包
- 修复 PYTHON_BIN 在 Windows 下需要 .exe 后缀
- 更新 extraResources 为目录式 glob,同时兼容 macOS (main) 和 Windows (main.exe)
- package.json 新增 win/nsis electron-builder 目标配置

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 23:02:53 +08:00
MikiVL
70a56ede36 添加 macOS 安装包打包支持
- 重命名 parser.py → xl_parser.py 避免与 Python 3.9 stdlib 命名冲突
- 添加 PyInstaller spec 文件用于构建独立 Python 可执行文件
- 配置 electron-builder:extraResources 打包 Python binary、asarUnpack better-sqlite3
- 新增 build:python 和 dist 脚本,一键生成 DMG 安装包
- 更新测试:对齐新 fixture 结构和重命名后的模块

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 19:44:01 +08:00
MikiVL
9738d2cd67 添加 Playwright E2E 测试及构建修复
- 修复 vite.config.mjs base 路径为 "./" 解决 file:// 协议加载失败
- 添加测试专用 mockDialog IPC 绕过原生文件选择对话框
- 重建 better-sqlite3 以适配 Electron 内嵌 Node ABI
- 新增 6 个 E2E 测试:模板增删改、批量生成、文件解析

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 15:01:13 +08:00
MikiVL
fcf3d5c7c2 fix: 生成页错误处理,编辑模式支持更新模板文件 2026-05-05 14:03:19 +08:00
MikiVL
696fd54809 docs: 添加 README 和 .gitignore 2026-05-05 13:54:38 +08:00
MikiVL
c33b048217 fix: 生成前校验数据源文件路径 2026-05-05 13:53:50 +08:00
MikiVL
a01c09dc9f feat: 批量生成页(文件/手动输入、进度展示) 2026-05-05 13:47:42 +08:00
MikiVL
a37f17b3b6 feat: 模板配置页(上传文件、自动识别占位符、字段映射) 2026-05-05 13:46:17 +08:00
MikiVL
58f639c113 feat: 字段映射编辑组件 2026-05-05 13:45:26 +08:00
MikiVL
37951760e3 feat: 模板管理页(列表、分组、详情) 2026-05-05 13:44:58 +08:00
MikiVL
8fa85966e0 chore: React + Vite + Tailwind CSS 脚手架
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 13:43:20 +08:00
MikiVL
b3be6f5f03 feat: 批量生成 IPC handler 2026-05-05 13:37:15 +08:00
MikiVL
1c164ea3d9 fix: 为 callPython 添加 spawn 错误处理,防止进程启动失败时永久挂起 2026-05-05 13:36:44 +08:00
MikiVL
aee1c6bb69 feat: 模板管理 IPC handler 2026-05-05 13:36:06 +08:00
MikiVL
d92e39c936 feat: SQLite 数据库初始化及模板 CRUD 2026-05-05 13:34:46 +08:00
MikiVL
68f90f4e4c chore: Electron 主进程脚手架
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 13:32:43 +08:00
MikiVL
8fe2d2bb88 test: 验证 Python stdin/stdout JSON 通信 2026-05-05 13:19:20 +08:00
MikiVL
7ca81403e0 fix: rows is None 判断逻辑,防止空列表误触发文件读取 2026-05-05 13:15:09 +08:00
MikiVL
eb82650c03 feat: 实现批量 Excel 生成(文本、图片、表格区域)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 13:05:23 +08:00
MikiVL
504bd2f65f fix: 修复多占位符识别,补充测试 2026-05-05 12:58:22 +08:00
MikiVL
1f51665e42 feat: 实现模板解析,自动识别 {{占位符}} 2026-05-05 05:52:42 +08:00
MikiVL
18de4f9f47 fix: 移除 .gitignore 中的重复条目 2026-05-05 05:42:39 +08:00
MikiVL
dd62b15ef4 fix: 清理 git 历史,修正 package.json 和 .gitignore 2026-05-05 05:38:06 +08:00
MikiVL
9bbd7fc63f chore: 初始化项目结构 2026-05-05 05:34:30 +08:00