2 Star 2 Fork 3

qiaodian/zao-test

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
tools.py 1.87 KB
一键复制 编辑 原始数据 按行查看 历史
qiucheng1 提交于 2019-09-06 16:22 . import
#!/usr/bin/env python3
""" The master tools.py script """
import sys
# Importing the various tools
import tools.cli as cli
from lib.cli import FullHelpArgumentParser
# Python version check
if sys.version_info[0] < 3:
raise Exception("This program requires at least python3.2")
if sys.version_info[0] == 3 and sys.version_info[1] < 2:
raise Exception("This program requires at least python3.2")
def bad_args(args): # pylint:disable=unused-argument
""" Print help on bad arguments """
PARSER.print_help()
exit(0)
if __name__ == "__main__":
_TOOLS_WARNING = "Please backup your data and/or test the tool you want "
_TOOLS_WARNING += "to use with a smaller data set to make sure you "
_TOOLS_WARNING += "understand how it works."
print(_TOOLS_WARNING)
PARSER = FullHelpArgumentParser()
SUBPARSER = PARSER.add_subparsers()
ALIGN = cli.AlignmentsArgs(SUBPARSER,
"alignments",
"This command lets you perform various tasks pertaining to an "
"alignments file.")
PREVIEW = cli.PreviewArgs(SUBPARSER,
"preview",
"This command allows you to preview swaps to tweak convert "
"settings.")
EFFMPEG = cli.EffmpegArgs(SUBPARSER,
"effmpeg",
"This command allows you to easily execute common ffmpeg tasks.")
RESTORE = cli.RestoreArgs(SUBPARSER,
"restore",
"This command lets you restore models from backup.")
SORT = cli.SortArgs(SUBPARSER,
"sort",
"This command lets you sort images using various methods.")
PARSER.set_defaults(func=bad_args)
ARGUMENTS = PARSER.parse_args()
ARGUMENTS.func(ARGUMENTS)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qiaodian/zao-test.git
git@gitee.com:qiaodian/zao-test.git
qiaodian
zao-test
zao-test
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385