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)
This commit is contained in:
parent
d8cabdfdb5
commit
b69e4dff37
@ -29,7 +29,12 @@ from .wrapper import Url
|
|||||||
)
|
)
|
||||||
@click.option("-v", "--version", is_flag=True, default=False, help="waybackpy version.")
|
@click.option("-v", "--version", is_flag=True, default=False, help="waybackpy version.")
|
||||||
@click.option(
|
@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(
|
@click.option(
|
||||||
"-n",
|
"-n",
|
||||||
@ -124,6 +129,7 @@ from .wrapper import Url
|
|||||||
)
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
"-f",
|
"-f",
|
||||||
|
"--cdxfilter",
|
||||||
"--filter",
|
"--filter",
|
||||||
multiple=True,
|
multiple=True,
|
||||||
help="Filter on a specific field or all the CDX fields.",
|
help="Filter on a specific field or all the CDX fields.",
|
||||||
@ -167,7 +173,7 @@ def main(
|
|||||||
url: Optional[str],
|
url: Optional[str],
|
||||||
user_agent: str,
|
user_agent: str,
|
||||||
version: bool,
|
version: bool,
|
||||||
license: bool,
|
showlicense: bool,
|
||||||
newest: bool,
|
newest: bool,
|
||||||
oldest: bool,
|
oldest: bool,
|
||||||
json: bool,
|
json: bool,
|
||||||
@ -185,7 +191,7 @@ def main(
|
|||||||
cdx: bool,
|
cdx: bool,
|
||||||
start_timestamp: Optional[str],
|
start_timestamp: Optional[str],
|
||||||
end_timestamp: Optional[str],
|
end_timestamp: Optional[str],
|
||||||
filter: List[str],
|
cdxfilter: List[str],
|
||||||
match_type: Optional[str],
|
match_type: Optional[str],
|
||||||
gzip: Optional[str],
|
gzip: Optional[str],
|
||||||
collapse: List[str],
|
collapse: List[str],
|
||||||
@ -218,7 +224,7 @@ def main(
|
|||||||
click.echo(f"waybackpy version {__version__}")
|
click.echo(f"waybackpy version {__version__}")
|
||||||
return
|
return
|
||||||
|
|
||||||
if license:
|
if showlicense:
|
||||||
click.echo(
|
click.echo(
|
||||||
requests.get(
|
requests.get(
|
||||||
url="https://raw.githubusercontent.com/akamhy/waybackpy/master/LICENSE"
|
url="https://raw.githubusercontent.com/akamhy/waybackpy/master/LICENSE"
|
||||||
@ -344,7 +350,7 @@ def main(
|
|||||||
click.echo(url)
|
click.echo(url)
|
||||||
|
|
||||||
if cdx:
|
if cdx:
|
||||||
filters = list(filter)
|
filters = list(cdxfilter)
|
||||||
collapses = list(collapse)
|
collapses = list(collapse)
|
||||||
cdx_print = list(cdx_print)
|
cdx_print = list(cdx_print)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user