mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
feat: support DrissionPage CLI
This commit is contained in:
parent
81b5827438
commit
b8392817fa
15
DrissionPage/cli.py
Normal file
15
DrissionPage/cli.py
Normal file
@ -0,0 +1,15 @@
|
||||
import click
|
||||
from DrissionPage.easy_set import set_paths
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.option("-p", "--browser-path", help="Setting browser path.")
|
||||
def main(browser_path):
|
||||
"""DrissionPage CLI."""
|
||||
if browser_path:
|
||||
set_paths(browser_path=browser_path)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
11
setup.py
11
setup.py
@ -17,6 +17,7 @@ setup(
|
||||
url="https://gitee.com/g1879/DrissionPage",
|
||||
include_package_data=True,
|
||||
packages=find_packages(),
|
||||
zip_safe=False,
|
||||
install_requires=[
|
||||
"selenium",
|
||||
"lxml",
|
||||
@ -24,7 +25,8 @@ setup(
|
||||
"requests",
|
||||
"DownloadKit>=0.5.0",
|
||||
"FlowViewer",
|
||||
"websocket-client"
|
||||
"websocket-client",
|
||||
'click~=8.1.3'
|
||||
],
|
||||
classifiers=[
|
||||
"Programming Language :: Python :: 3.6",
|
||||
@ -32,5 +34,10 @@ setup(
|
||||
"Topic :: Utilities",
|
||||
"License :: OSI Approved :: BSD License",
|
||||
],
|
||||
python_requires='>=3.6'
|
||||
python_requires='>=3.6',
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'dp = DrissionPage.cli:main',
|
||||
],
|
||||
},
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user