fix:修复一些BUG

This commit is contained in:
2025-12-11 17:52:39 +08:00
parent 4a5672ee62
commit ed4b324dba
11 changed files with 356 additions and 162 deletions

14
main.py
View File

@@ -5,8 +5,7 @@ from utils.generate_utils import (
batch_convert_folder,
generate_zodiac,
)
from utils.file_utils import export_data_folder, initialize_project
from UI import applicationUI
from utils.file_utils import export_templates_folder, initialize_project, export_data
def application():
@@ -38,7 +37,8 @@ def application():
table.add_row("5.", "📑 生肖转化(根据生日)")
table.add_row("6.", "📦 导出数据模板Zip")
table.add_row("7.", "📦 初始化系统")
table.add_row("8.", "🚪 退出系统")
table.add_row("8.", "📤 导出数据")
table.add_row("9.", "🚪 退出系统")
# 4. 将表格放入面板,并居中显示
panel = Panel(
@@ -56,7 +56,7 @@ def application():
choice = Prompt.ask(
"👉 请输入序号执行",
choices=["1", "2", "3", "4", "5", "6", "7","8"],
choices=["1", "2", "3", "4", "5", "6", "7","8","9"],
default="1",
)
@@ -88,12 +88,16 @@ def application():
elif choice == "6":
console.rule("[bold magenta]正在执行: 导出数据模板[/]")
# 调用上面的批量转换函数,传入你的 output 文件夹路径
export_data_folder()
export_templates_folder()
elif choice == "7":
console.rule("[bold magenta]正在执行: 初始化系统[/]")
# 调用上面的批量转换函数,传入你的 output 文件夹路径
initialize_project()
elif choice == "8":
console.rule("[bold magenta]正在执行: 导出数据[/]")
# 调用上面的批量转换函数,传入你的 output 文件夹路径
export_data()
elif choice == "9":
console.print("[bold red]👋 再见![/]")
sys.exit()
Prompt.ask("按 [bold]Enter[/] 键返回主菜单...")