chore: 初始化项目结构

This commit is contained in:
MikiVL 2026-05-05 05:34:30 +08:00
commit 9bbd7fc63f
9 changed files with 87 additions and 0 deletions

42
.gitignore vendored Normal file
View File

@ -0,0 +1,42 @@
# Python
python/.venv/
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# Node
node_modules/
npm-debug.log
yarn-error.log
# IDE
.vscode/
.idea/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db
# Electron
dist/
out/

13
package.json Normal file
View File

@ -0,0 +1,13 @@
{
"name": "excel-batch-editor",
"version": "0.1.0",
"description": "Electron desktop app for bulk editing Excel files",
"main": "electron/main.js",
"type": "module",
"scripts": {
"dev": "electron .",
"build": "electron-builder"
},
"dependencies": {},
"devDependencies": {}
}

1
python/generator.py Normal file
View File

@ -0,0 +1 @@
# placeholder

25
python/main.py Normal file
View File

@ -0,0 +1,25 @@
import sys
import json
def main():
for line in sys.stdin:
line = line.strip()
if not line:
continue
try:
req = json.loads(line)
action = req.get("action")
if action == "parse_template":
from parser import parse_template
result = parse_template(req["file_path"])
elif action == "generate":
from generator import generate
result = generate(req)
else:
result = {"error": f"unknown action: {action}"}
except Exception as e:
result = {"error": str(e)}
print(json.dumps(result, ensure_ascii=False), flush=True)
if __name__ == "__main__":
main()

1
python/parser.py Normal file
View File

@ -0,0 +1 @@
# placeholder

3
python/requirements.txt Normal file
View File

@ -0,0 +1,3 @@
openpyxl==3.1.2
Pillow==10.3.0
pytest==8.2.0

0
tests/python/__init__.py Normal file
View File

View File

@ -0,0 +1 @@
# placeholder

View File

@ -0,0 +1 @@
# placeholder