diff --git a/app.py b/app.py new file mode 100644 index 0000000000000000000000000000000000000000..2e28e32ad1a5534a91b6487c9fb5357af48c2c54 --- /dev/null +++ b/app.py @@ -0,0 +1,24 @@ +import os +import logging +import requests +import argparse +from gitee import Gitee + + +def main(): + """main function""" + if not os.path.exists("gitee.conf"): + logging.error("config file does not exist") + return + commands() + +def commands(): + gitee = Gitee("gitee.conf") + parser = argparse.ArgumentParser(description="test argparse") + parser.add_argument("-O", "--organization", type=str, help="get info about an organization") + args = parser.parse_args() + + if args.organization: + gitee.get_orgs_info(args.organization) + +main() \ No newline at end of file