From de15c67f6ab58f686b172953ebd0560ebdb9d8ef Mon Sep 17 00:00:00 2001 From: LeeCQ Date: Sat, 16 Dec 2023 11:08:00 +0800 Subject: [PATCH] =?UTF-8?q?Format=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alist_sync/__main__.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/alist_sync/__main__.py b/alist_sync/__main__.py index a73e5d3..f920b2e 100644 --- a/alist_sync/__main__.py +++ b/alist_sync/__main__.py @@ -16,12 +16,15 @@ app = Typer() _base_url: str = Option( - 'http://localhost:5244', '--host', '-h', + 'http://localhost:5244', + '--host', '-h', help="Base URL for Alist Host", + ) _username: str = Option( - '', "--username", "-u", + '', + "--username", "-u", help="Alist Admin Username" ) @@ -36,7 +39,8 @@ ) _verify: bool = Option( - True, "--verify", "-v", + False, "--verify", "-v", + # is_flag=True, help="Verify SSL Certificates" ) @@ -185,11 +189,10 @@ def sync_incr( if __name__ == '__main__': - # logging.basicConfig(level='INFO') + from rich.logging import RichHandler logger = logging.getLogger('alist-sync') - hander = logging.StreamHandler() - hander.setLevel("DEBUG") - # hander.setFormatter("") - logger.addHandler(hander) + handler = RichHandler() + handler.setLevel("DEBUG") + logger.addHandler(handler) logger.setLevel("DEBUG") app()