From 7eceba440492df8ee2defd86177a846b329ddf26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AD=90?= <49679880@qq.com> Date: Mon, 6 Mar 2023 17:49:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E8=BF=9B=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 +++++- README.md | 12 ++++++++++++ utils/tools.py | 9 +++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 17a100e..8313d4d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,8 @@ temp venv logs workspace -lib \ No newline at end of file +lib +build +dist +imgs +*.spec \ No newline at end of file diff --git a/README.md b/README.md index 8c47d64..4d5f762 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,18 @@ GUI界面! ## 安装教程 +### 运行编译好的exe文件 + + + + + + + + + + + 1. 克隆本项目 gitee: diff --git a/utils/tools.py b/utils/tools.py index 9612deb..86d419b 100644 --- a/utils/tools.py +++ b/utils/tools.py @@ -639,6 +639,15 @@ def text_to_aishell3_like(text): def read_ini_config(ini_path="conf/config.ini"): + if not os.path.exists(ini_path): + # 如果不存在,则创建一个默认配置文件 + os.makedirs(os.path.dirname(ini_path), exist_ok=True) + info = """[program_configs] +default_workspace = .\workspace + +""" + with open(ini_path, 'w') as f: + f.write(info) config = ConfigParserWithFile() config.read(ini_path) global_obj.set_value("config", config)