From dad4bcebfed0b114e023d2bbb53659afa1513cea Mon Sep 17 00:00:00 2001 From: Pandaft Date: Sun, 2 Oct 2022 19:49:56 +0800 Subject: [PATCH] =?UTF-8?q?chore(cli):=20=E8=B7=B3=E8=BF=87=E6=9C=AA?= =?UTF-8?q?=E5=A1=AB=E5=86=99=E7=9A=84=E5=90=AB=E9=BB=98=E8=AE=A4=E5=80=BC?= =?UTF-8?q?=E7=9A=84=E5=8F=82=E6=95=B0=E6=8F=90=E7=A4=BA=E8=BE=93=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uploader/cli.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/uploader/cli.py b/uploader/cli.py index b953edd..02d40f4 100644 --- a/uploader/cli.py +++ b/uploader/cli.py @@ -5,7 +5,7 @@ @click.group() def cli(): - """uploader - v0.1.0""" + """uploader - v0.1.4""" pass @@ -13,12 +13,12 @@ def cli(): @click.option("--authorization", type=str, prompt="用户 authorization", help="用户 authorization", required=True) @click.option("--remember_mev2", type=str, prompt="用户 remember-mev2", help="用户 remember-mev2", required=True) @click.option("--upload_path", type=str, prompt="待上传文件或目录路径", help="待上传文件或目录路径", required=True) -@click.option("--folder_name", type=str, prompt="文件夹名称", help="文件夹名称", default="") -@click.option("--title", type=str, prompt="传输标题", help="传输标题", default="") -@click.option("--message", type=str, prompt="传输描述", help="传输描述", default="") -@click.option("--valid_days", type=int, prompt="传输有效期(天)", help="传输有效期(天)", default=7, show_default=True) -@click.option("--chunk_size", type=int, prompt="分块大小(字节)", help="分块大小(字节)", default=2097152, show_default=True) -@click.option("--threads", type=int, prompt="上传并发数", help="上传并发数", default=5, show_default=True) +@click.option("--folder_name", type=str, help="文件夹名称", default="") +@click.option("--title", type=str, help="传输标题", default="") +@click.option("--message", type=str, help="传输描述", default="") +@click.option("--valid_days", type=int, help="传输有效期(天)", default=7, show_default=True) +@click.option("--chunk_size", type=int, help="分块大小(字节)", default=2097152, show_default=True) +@click.option("--threads", type=int, help="上传并发数", default=5, show_default=True) def cow(authorization, remember_mev2, upload_path, folder_name, title, message, valid_days, chunk_size, threads): """CowTransfer - 奶牛快传""" thread = CowUploader(authorization, remember_mev2, upload_path, folder_name, @@ -35,15 +35,15 @@ def cow(authorization, remember_mev2, upload_path, folder_name, title, message, @click.option("--client_id", type=str, prompt="client_id", help="client_id", required=True) @click.option("--client_key", type=str, prompt="client_key", help="client_key", required=True) @click.option("--upload_path", type=str, prompt="待上传文件或目录路径", help="待上传文件或目录路径", required=True) -@click.option("--title", type=str, prompt="分享链接的标题", help="分享链接的标题", default="untitled") -@click.option("--password", type=str, prompt="分享链接的密码", help="分享链接的密码(4位数字,默认无密码)", default="") -@click.option("--valid_days", type=int, prompt="传输有效期(天)", help="传输有效期(天)", default=7, show_default=True) -@click.option("--chunk_size", type=int, prompt="分块大小(字节)", help="分块大小(字节)", default=2097152, show_default=True) -@click.option("--threads", type=int, prompt="上传并发数", help="上传并发数", default=5, show_default=True) +@click.option("--title", type=str, help="分享链接的标题", default="untitled") +@click.option("--password", type=str, help="分享链接的密码(4位数字,默认无密码)", default="") +@click.option("--valid_days", type=int, help="传输有效期(天)", default=7, show_default=True) +@click.option("--chunk_size", type=int, help="分块大小(字节)", default=2097152, show_default=True) +@click.option("--threads", type=int, help="上传并发数", default=5, show_default=True) def muse(client_id, client_key, upload_path, title, password, valid_days, chunk_size, threads): """MuseTransfer""" thread = MuseUploader(client_id, client_key, upload_path, title, - password, valid_days, chunk_size, threads) + password, valid_days, chunk_size, threads) if thread.start_upload(): click.echo(f"链接:{thread.upload_info.get('transfer_url')}") else: