From b69e4dff37795a41b2e59f335807b810eb1dfe3c Mon Sep 17 00:00:00 2001 From: Akash Mahanty Date: Sat, 5 Feb 2022 00:30:35 +0530 Subject: [PATCH] rename params of main in cli.py to avoid using built-ins (#132) * rename params of main in cli.py to avoid using built-ins * Fix Line 32:80: E501 line too long (102 > 79 characters) --- waybackpy/cli.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/waybackpy/cli.py b/waybackpy/cli.py index adf41d0..759d87d 100644 --- a/waybackpy/cli.py +++ b/waybackpy/cli.py @@ -29,7 +29,12 @@ from .wrapper import Url ) @click.option("-v", "--version", is_flag=True, default=False, help="waybackpy version.") @click.option( - "-l", "--license", is_flag=True, default=False, help="license of Waybackpy." + "-l", + "--showlicense", + "--license", + is_flag=True, + default=False, + help="show license of Waybackpy.", ) @click.option( "-n", @@ -124,6 +129,7 @@ from .wrapper import Url ) @click.option( "-f", + "--cdxfilter", "--filter", multiple=True, help="Filter on a specific field or all the CDX fields.", @@ -167,7 +173,7 @@ def main( url: Optional[str], user_agent: str, version: bool, - license: bool, + showlicense: bool, newest: bool, oldest: bool, json: bool, @@ -185,7 +191,7 @@ def main( cdx: bool, start_timestamp: Optional[str], end_timestamp: Optional[str], - filter: List[str], + cdxfilter: List[str], match_type: Optional[str], gzip: Optional[str], collapse: List[str], @@ -218,7 +224,7 @@ def main( click.echo(f"waybackpy version {__version__}") return - if license: + if showlicense: click.echo( requests.get( url="https://raw.githubusercontent.com/akamhy/waybackpy/master/LICENSE" @@ -344,7 +350,7 @@ def main( click.echo(url) if cdx: - filters = list(filter) + filters = list(cdxfilter) collapses = list(collapse) cdx_print = list(cdx_print)