#!/usr/bin/env python # -*- encoding: utf-8 -*- """ @Contact : liuyuqi.gov@msn.cn @Time : 2024/07/22 @License : Copyright © 2017-2022 liuyuqi. All Rights Reserved. @Desc : enter point """ from auto_commit.utils.colors import bcolors from auto_commit.auto_commit import AutoCommit from auto_commit.options import parse_args if __name__=='__main__': args = parse_args() print(args['cmd']) try: if args['path'] is not None and args['cmd'] is not None: if args['cmd'] == 'commit': auto_commit = AutoCommit(params=args) auto_commit.commit() elif args['cmd'] == 'sync': auto_commit = AutoCommit(params=args) auto_commit.sync() elif args['cmd'] == 'check': auto_commit = AutoCommit(params=args) auto_commit.check() elif args['cmd'] == 'help': print('help') elif args['cmd'] == 'version': print('version') else: print(f"{bcolors.FAIL}Please input path {bcolors.ENDC}") except Exception as e: print(e) print(f"{bcolors.FAIL}Please input path {bcolors.ENDC}")