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): def setEnv(self):
'''set the usable port for application''' '''set the usable port for application'''
fileop=model.FileOp() fileop=model.FileOp()
print(fileop.fileToJson('./drupal/.env')) print(fileop.fileToJson(self.folder+'/.env'))
pass pass
def upRepo(self): def upRepo(self):

View file

@ -55,6 +55,8 @@ class FileOp:
def fileToJson(self, path: str, remark: Optional[str] = "#", separate: Optional[str] = "="): def fileToJson(self, path: str, remark: Optional[str] = "#", separate: Optional[str] = "="):
''' convert file to Json ''' ''' convert file to Json '''
print(path)
dict = {} dict = {}
with open(path) as fh: with open(path) as fh:
for line in 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 one application'''
create = controller.Create(app_name, project_name) create = controller.Create(app_name, project_name)
create.downRepo() create.downRepo()
create.upRepo()
create.setEnv() create.setEnv()
create.upRepo()
create.printResult() create.printResult()
@app.command() @app.command()