This commit is contained in:
chendelin1982 2021-10-10 23:54:15 +08:00
parent 320753fd57
commit 08cd4d33cf
6 changed files with 4 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View file

@ -45,7 +45,7 @@ class Create:
def setEnv(self):
'''set the usable port for application'''
fileop=model.FileOp()
print(fileop.fileToJson('./drupal/.env'))
print(fileop.fileToJson(self.folder+'/.env'))
pass
def upRepo(self):

View file

@ -55,6 +55,8 @@ class FileOp:
def fileToJson(self, path: str, remark: Optional[str] = "#", separate: Optional[str] = "="):
''' convert file to Json '''
print(path)
dict = {}
with open(path) as fh:
for line in fh:

View file

@ -18,8 +18,8 @@ def create(app_name: str, project_name: Optional[str] = None):
'''create one application'''
create = controller.Create(app_name, project_name)
create.downRepo()
create.upRepo()
create.setEnv()
create.upRepo()
create.printResult()
@app.command()