MikiVL 2c649b8c7c
Some checks failed
Build Windows Installer / build-windows (push) Has been cancelled
构建安装包 / build-windows (push) Has been cancelled
构建安装包 / build-mac (push) Has been cancelled
添加 GitHub Actions 自动构建 Windows/macOS 安装包
每次推送 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
2026-05-05 19:44:01 +08:00
2026-05-05 13:54:38 +08:00
2026-05-05 13:54:38 +08:00

Excel 批量编辑器

跨平台桌面应用Mac/Windows支持上传 Excel 模板、标记可替换字段,批量生成填充好的输出文件。

开发环境

前置条件

  • Node.js 18+
  • Python 3.9+(或 3.11+ 更佳)

安装依赖

npm install
cd /path/to/excel-batch-editor && source python/.venv/bin/activate 2>/dev/null || python3 -m venv python/.venv && source python/.venv/bin/activate && pip install -r python/requirements.txt

或分步执行:

# Node.js 依赖
npm install

# Python 依赖
cd excel-batch-editor
python3 -m venv python/.venv
source python/.venv/bin/activate   # Windows: python\.venv\Scripts\activate
pip install -r python/requirements.txt

开发模式启动

export PYTHON_PATH=$(which python3)   # 或使用 venvexport PYTHON_PATH=$(pwd)/python/.venv/bin/python3
NODE_ENV=development npm run dev

应用将在 http://localhost:5173 启动渲染进程Electron 窗口自动打开。

运行 Python 测试

source python/.venv/bin/activate
pytest tests/python/ -v

项目结构

excel-batch-editor/
├── electron/          # Electron 主进程
│   ├── main.js        # 入口
│   ├── preload.js     # IPC 桥接
│   ├── ipc/           # IPC handler
│   └── db/            # SQLite 操作
├── renderer/          # React 前端Vite
│   └── src/
│       ├── pages/     # 页面组件
│       └── components/ # 通用组件
├── python/            # Python Excel 处理
│   ├── main.py        # stdin/stdout 入口
│   ├── parser.py      # 模板解析
│   └── generator.py   # 批量生成
└── tests/             # 测试
    └── python/        # Python 单元测试

技术栈

  • 桌面壳Electron 28跨平台
  • UIReact 18 + Vite + Tailwind CSS
  • Excel 处理Python 3 + openpyxl
  • 本地存储SQLitebetter-sqlite3
Description
批量编辑 Excel 的桌面应用
Readme 217 KiB
Languages
JavaScript 76.7%
Python 22.6%
HTML 0.7%