chore: 初始化项目结构
This commit is contained in:
@@ -0,0 +1 @@
|
||||
# placeholder
|
||||
@@ -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()
|
||||
@@ -0,0 +1 @@
|
||||
# placeholder
|
||||
@@ -0,0 +1,3 @@
|
||||
openpyxl==3.1.2
|
||||
Pillow==10.3.0
|
||||
pytest==8.2.0
|
||||
Reference in New Issue
Block a user