up
This commit is contained in:
parent
ba65811129
commit
d0ee275f1d
12
main.py
12
main.py
@ -1,24 +1,24 @@
|
|||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import config as cfg
|
import dir as dir
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
# 读取配置文件
|
# 读取配置文件
|
||||||
conFigList = cfg.read_config_file()
|
conFigList = dir.read_config_file()
|
||||||
if not conFigList:
|
if not conFigList:
|
||||||
print('[没有找到配置文件]')
|
print('[没有找到配置文件]')
|
||||||
input('请按任意键退出...')
|
input('请按任意键退出...')
|
||||||
else:
|
else:
|
||||||
# 选择运行配置
|
# 选择运行配置
|
||||||
data = cfg.run_config_selector(conFigList)
|
data = dir.run_config_selector(conFigList)
|
||||||
if not data:
|
if not data:
|
||||||
os.system('cls')
|
os.system('cls')
|
||||||
print('[配置文件不存在]\n')
|
print('[配置文件不存在]\n')
|
||||||
run()
|
run()
|
||||||
else:
|
else:
|
||||||
# 处理目录结构
|
# 处理目录结构
|
||||||
dirDict = cfg.config_dir_structure(data)
|
dirDict = dir.config_dir_structure(data)
|
||||||
os.system('cls')
|
os.system('cls')
|
||||||
if not dirDict:
|
if not dirDict:
|
||||||
print('[配置文件为空]\n')
|
print('[配置文件为空]\n')
|
||||||
@ -26,9 +26,11 @@ def run():
|
|||||||
else:
|
else:
|
||||||
# 创建目录
|
# 创建目录
|
||||||
base_path = '.'
|
base_path = '.'
|
||||||
cfg.create_folders(base_path, dirDict)
|
dir.create_folders(base_path, dirDict)
|
||||||
print('[目录创建成功]\n')
|
print('[目录创建成功]\n')
|
||||||
run()
|
run()
|
||||||
|
|
||||||
|
#
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
run()
|
run()
|
Loading…
x
Reference in New Issue
Block a user