36 lines
922 B
Python
36 lines
922 B
Python
# -*- coding: UTF-8 -*-
|
|
|
|
import os
|
|
import dir as dir
|
|
|
|
def run():
|
|
# 读取配置文件
|
|
conFigList = dir.read_config_file()
|
|
if not conFigList:
|
|
print('[没有找到配置文件]')
|
|
input('请按任意键退出...')
|
|
else:
|
|
# 选择运行配置
|
|
data = dir.run_config_selector(conFigList)
|
|
if not data:
|
|
os.system('cls')
|
|
print('[配置文件不存在]\n')
|
|
run()
|
|
else:
|
|
# 处理目录结构
|
|
dirDict = dir.config_dir_structure(data)
|
|
os.system('cls')
|
|
if not dirDict:
|
|
print('[配置文件为空]\n')
|
|
run()
|
|
else:
|
|
# 创建目录
|
|
base_path = '.'
|
|
dir.create_folders(base_path, dirDict)
|
|
print('[目录创建成功]\n')
|
|
run()
|
|
|
|
#
|
|
|
|
if __name__ == '__main__':
|
|
run() |