From 76c58aabef5f35772cf961b87b47b4deb6b3da96 Mon Sep 17 00:00:00 2001 From: chendelin1982 Date: Tue, 28 Sep 2021 18:34:18 +0800 Subject: [PATCH] docs --- cli/Notes.md | 6 +- cli/__pycache__/controller.cpython-36.pyc | Bin 1699 -> 2119 bytes cli/__pycache__/model.cpython-36.pyc | Bin 1975 -> 4304 bytes cli/controller.py | 20 ++++- cli/drupal2 | 1 - cli/install.sh | 2 +- cli/joomla | 1 + cli/model.py | 86 ++++++++++++++++++---- cli/requirements.txt | 4 +- cli/stackhub.py | 7 ++ cli/test.py | 4 + cli/version | 2 + 12 files changed, 110 insertions(+), 23 deletions(-) delete mode 160000 cli/drupal2 create mode 160000 cli/joomla create mode 100644 cli/version diff --git a/cli/Notes.md b/cli/Notes.md index e3922121..b6b1ca4e 100644 --- a/cli/Notes.md +++ b/cli/Notes.md @@ -11,4 +11,8 @@ 用户同步 stackhub 上已经存放的清单,而不是通过 API 获取。原因: 1. 避免API使用需要授权或超时 -2. 避免未发布的应用被安装 \ No newline at end of file +2. 避免未发布的应用被安装 + +#### 如何获取所有已占用的端口号? + +基于 psutil 模块打印所有端口信息,然后匹配关键词 \ No newline at end of file diff --git a/cli/__pycache__/controller.cpython-36.pyc b/cli/__pycache__/controller.cpython-36.pyc index e4777edd2d033aaae0d4e636dedd826a5634eff8..1ebb91a8542aab36bd044003e94066899d8e1178 100644 GIT binary patch literal 2119 zcmaJ?&5qkP5GM6!S@vd=O}aibMO8EnpaQng_E5A)iv<>K&>oy1L4iOQK`YX+yt1T{ zbkY^Jr`^Zs3-ncb?Ty!-`U-pM3}t(rO&S>*4rfN>aK7Q^ulDwW`0r=gUoIj4ke$Z{ z{Rm$90t6$BmL%y$nou*h63dKsV#8>aWa%UhCCpA-<|G~)CcVdm`K*6QSpULGe3%7n z0J8zi`iwp&(cZtXI+;dPyN?U?q-jT!m}M%9v!*GFJX1woP0B(lO|A~+N;UG^IDT2E z`RZhn*UPJq-nLEhs#z}Nq!ur)MjJQ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7du5<(HCs0@X@sL)D)BFcwaPM|ccP3vIC>Ddu&m9|5= zFd$Ujj@a2j;(tJ5VL6EfrY;~cGw?12iG`DXzvtik^1FMV>hJT7*=#oTIk(jQs1x#y z{Bux~IYji~sIhPWzQrtuIN&E)60PQ^f;3A98I}pMEF0ulF37WdP+*0i$cn)j8w*OT z1Y}fGX5%A!ij6N4M|bEUap+KE6;uhwKxLq+qB0!|m4)iG1NVuYJXRw$kA8_%vbN#I zwLbT2;*C)kUts%yVyuXmM?@W@ZD&AkkSCA#ASNB?Xag9+p0-mRDSZGAIND3CLx%*& z0Q*ydkwnLMmg1{G_H-b-W3f5VJJt|@JU5ofBXt9e?CUFJ%TQQGjg#rkAU~ zfgAQ?J1OdV>GnN$tM5j!G;!9j=XNFKZrhOwm-CQI>*2jSH%DKI9{0MjG%y;4U7PX( zwv*J0-GJ%b-ICynRlT0efCgoth!j*c@k+l1lVT}d6+iWXCviv^ zJ}QoAN@LNBH~VY5g%c~jrx(O)TAawA=$Tf_>w0mkwT>N5j`(4n5f9R3@h*|SrkWGj z{hPhv#q)mHb(^-q&tinv6x9`-Q= 3): + break + print(password) + + +test=SecurityOp() +#test.setPort(9001) +test.randomPass(25) \ No newline at end of file diff --git a/cli/requirements.txt b/cli/requirements.txt index 7379290e..14fedd0b 100644 --- a/cli/requirements.txt +++ b/cli/requirements.txt @@ -1 +1,3 @@ -typer \ No newline at end of file +typer +psutil +jq \ No newline at end of file diff --git a/cli/stackhub.py b/cli/stackhub.py index 0a9bab23..a7a002dc 100644 --- a/cli/stackhub.py +++ b/cli/stackhub.py @@ -19,6 +19,13 @@ def create(app_name: str, project_name: Optional[str] = None): create = controller.Create(app_name, project_name) create.downRepo() create.upRepo() + create.setEnv() + create.printResult() + +@app.command() +def start(app_name: str, project_name: Optional[str] = None): + '''start one application''' + pass @app.command() def update(name: str): diff --git a/cli/test.py b/cli/test.py index e69de29b..6c4e5795 100644 --- a/cli/test.py +++ b/cli/test.py @@ -0,0 +1,4 @@ +import json + +with open("./joomla/.env_all","r") as file: + jsonData = json.dump(file, tempfile) \ No newline at end of file diff --git a/cli/version b/cli/version new file mode 100644 index 00000000..fcd84483 --- /dev/null +++ b/cli/version @@ -0,0 +1,2 @@ +stable: 1.3 +compatible: 1.23 \ No newline at end of file