模块化重构代码

This commit is contained in:
2026-02-14 01:08:38 +08:00
parent f07619c5b4
commit ca8ff7db82
9 changed files with 896 additions and 563 deletions

30
quickgit.py Normal file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
QuickGit - 萌芽一键Git管理工具
主程序入口
"""
import sys
from quickgit.ui import GitManagerUI
def main():
"""主函数"""
try:
ui = GitManagerUI()
ui.run()
except KeyboardInterrupt:
from quickgit.utils import Colors
print(f"\n\n{Colors.WARNING}程序被用户中断{Colors.ENDC}")
sys.exit(0)
except Exception as e:
from quickgit.utils import Colors
print(f"\n{Colors.FAIL}发生错误: {str(e)}{Colors.ENDC}")
import traceback
traceback.print_exc()
sys.exit(1)
if __name__ == "__main__":
main()