fix:优化一些BUG
This commit is contained in:
8
.idea/.gitignore
generated
vendored
8
.idea/.gitignore
generated
vendored
@@ -1,8 +0,0 @@
|
|||||||
# 默认忽略的文件
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
||||||
# 基于编辑器的 HTTP 客户端请求
|
|
||||||
/httpRequests/
|
|
||||||
# Datasource local storage ignored files
|
|
||||||
/dataSources/
|
|
||||||
/dataSources.local.xml
|
|
||||||
6
.idea/encodings.xml
generated
6
.idea/encodings.xml
generated
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="Encoding">
|
|
||||||
<file url="file://$PROJECT_DIR$/start.bat" charset="US-ASCII" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
2
.idea/growth_report.iml
generated
2
.idea/growth_report.iml
generated
@@ -4,7 +4,7 @@
|
|||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<excludeFolder url="file://$MODULE_DIR$/.venv" />
|
<excludeFolder url="file://$MODULE_DIR$/.venv" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="uv (growth_report)" jdkType="Python SDK" />
|
<orderEntry type="jdk" jdkName="uv (growth_report) (2)" jdkType="Python SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PyDocumentationSettings">
|
<component name="PyDocumentationSettings">
|
||||||
|
|||||||
4
.idea/misc.xml
generated
4
.idea/misc.xml
generated
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="Black">
|
<component name="Black">
|
||||||
<option name="sdkName" value="uv (data_tools)" />
|
<option name="sdkName" value="uv (growth_report) (2)" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" project-jdk-name="uv (growth_report)" project-jdk-type="Python SDK" />
|
<component name="ProjectRootManager" version="2" project-jdk-name="uv (growth_report) (2)" project-jdk-type="Python SDK" />
|
||||||
</project>
|
</project>
|
||||||
2
.idea/vcs.xml
generated
2
.idea/vcs.xml
generated
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
<mapping directory="" vcs="Git" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
18
UI.py
18
UI.py
@@ -73,25 +73,25 @@ class ReportApp:
|
|||||||
|
|
||||||
# === A组: 核心功能 ===
|
# === A组: 核心功能 ===
|
||||||
func_btns = [
|
func_btns = [
|
||||||
("1. 📁 生成图片路径", self.run_generate_folders),
|
("📁 生成图片路径", self.run_generate_folders),
|
||||||
("2. 🤖 生成评语 (AI)", self.run_generate_comments),
|
("🤖 生成评语 (AI)", self.run_generate_comments),
|
||||||
("3. 📊 生成报告 (PPT)", self.run_generate_report),
|
("📊 生成报告 (PPT)", self.run_generate_report),
|
||||||
("4. 📑 格式转换 (PDF)", self.run_convert_pdf),
|
("📑 格式转换 (PDF)", self.run_convert_pdf),
|
||||||
("5. 🐂 生肖转化 (生日)", self.run_zodiac),
|
("🐂 生肖转化 (生日)", self.run_zodiac),
|
||||||
]
|
]
|
||||||
self.create_btn_group(main_content, "🛠️ 核心功能", func_btns, columns=3)
|
self.create_btn_group(main_content, "🛠️ 核心功能", func_btns, columns=3)
|
||||||
|
|
||||||
# === B组: 数据导出 ===
|
# === B组: 数据导出 ===
|
||||||
export_btns = [
|
export_btns = [
|
||||||
("6. 📦 导出数据模板 (Zip)", self.run_export_data_folder),
|
("📦 导出数据模板 (Zip)", self.run_export_data_folder),
|
||||||
("8. 📤 导出数据备份 (Zip)", self.run_export_data),
|
("📤 导出数据备份 (Zip)", self.run_export_data),
|
||||||
]
|
]
|
||||||
self.create_btn_group(main_content, "📦 数据管理", export_btns, columns=2)
|
self.create_btn_group(main_content, "📦 数据管理", export_btns, columns=2)
|
||||||
|
|
||||||
# === C组: 系统设置 ===
|
# === C组: 系统设置 ===
|
||||||
system_btns = [
|
system_btns = [
|
||||||
("7. ⚠️ 初始化系统 (重置)", self.run_initialize_project),
|
("⚠️ 初始化系统 (重置)", self.run_initialize_project),
|
||||||
("9. 🚪 退出系统", self.quit_app),
|
("🚪 退出系统", self.quit_app),
|
||||||
]
|
]
|
||||||
self.create_btn_group(main_content, "⚙️ 系统操作", system_btns, columns=2)
|
self.create_btn_group(main_content, "⚙️ 系统操作", system_btns, columns=2)
|
||||||
|
|
||||||
|
|||||||
9
main.py
9
main.py
@@ -1,3 +1,4 @@
|
|||||||
|
from config.config import load_config
|
||||||
from utils.generate_utils import (
|
from utils.generate_utils import (
|
||||||
generate_template,
|
generate_template,
|
||||||
generate_comment_all,
|
generate_comment_all,
|
||||||
@@ -7,6 +8,8 @@ from utils.generate_utils import (
|
|||||||
)
|
)
|
||||||
from utils.file_utils import export_templates_folder, initialize_project, export_data
|
from utils.file_utils import export_templates_folder, initialize_project, export_data
|
||||||
|
|
||||||
|
config = load_config("config.yaml")
|
||||||
|
|
||||||
|
|
||||||
def application():
|
def application():
|
||||||
from rich.console import Console
|
from rich.console import Console
|
||||||
@@ -56,7 +59,7 @@ def application():
|
|||||||
|
|
||||||
choice = Prompt.ask(
|
choice = Prompt.ask(
|
||||||
"👉 请输入序号执行",
|
"👉 请输入序号执行",
|
||||||
choices=["1", "2", "3", "4", "5", "6", "7","8","9"],
|
choices=["1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
||||||
default="1",
|
default="1",
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -64,7 +67,7 @@ def application():
|
|||||||
if choice == "1":
|
if choice == "1":
|
||||||
console.rule("[bold cyan]正在执行: 生成模板[/]")
|
console.rule("[bold cyan]正在执行: 生成模板[/]")
|
||||||
with console.status(
|
with console.status(
|
||||||
"[bold green]正在创建文件夹结构...[/]", spinner="dots"
|
"[bold green]正在创建文件夹结构...[/]", spinner="dots"
|
||||||
):
|
):
|
||||||
generate_template()
|
generate_template()
|
||||||
elif choice == "2":
|
elif choice == "2":
|
||||||
@@ -74,7 +77,7 @@ def application():
|
|||||||
elif choice == "3":
|
elif choice == "3":
|
||||||
console.rule("[bold blue]正在执行: PPT 合成[/]")
|
console.rule("[bold blue]正在执行: PPT 合成[/]")
|
||||||
with console.status(
|
with console.status(
|
||||||
"[bold blue]正在处理图片和文字...[/]", spinner="earth"
|
"[bold blue]正在处理图片和文字...[/]", spinner="earth"
|
||||||
):
|
):
|
||||||
generate_report()
|
generate_report()
|
||||||
elif choice == "4":
|
elif choice == "4":
|
||||||
|
|||||||
Reference in New Issue
Block a user