-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtms.py
More file actions
57 lines (48 loc) · 1.31 KB
/
Copy pathtms.py
File metadata and controls
57 lines (48 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import os
import json
class WebApplication:
def __init__(self,homepage,files,pyMapping):
self.__homepage=homepage
self.__files=files
self.__pyMapping=mapping
def setHomePage(self,homepage):
self.__homepage=homepage
def getHomePage(self):
return self.__homepage
def setFiles(self,files):
self.__files=files
def getFiles(self):
return self.__files
def setPyMapping(self,pyMapping):
self.__pyMapping=pyMapping
def getPyMapping(self):
return self.__pyMapping
file=open("server.conf","r+")
data=json.load(file)
contextNames=os.listdir('apps')
siteNames={}
print("hello")
for contextName in contextNames:
homepage=""
files=[]
pyMapping=[]
for root,dirs,fs in os.walk('./apps/'+contextName):
#print("Root ",root)
#print("Directories ",dirs)
#print("Files ",fs)
#print("-----------------------------------------------")
print("length ",len(fs))
if len(fs) !=0:
print(root.find("/private"))
if root.find("/private")==-1:
print("yahi yahi ",root)
files=files+fs
xyz="apps/"+contextName+"/private"
if xyz in root and "app.conf" in fs:
print(" hann site folder")
file=open(xyz+"/app.conf","r+")
appJsonData=json.load(file)
homepage=appJsonData["homepage"]
pyMapping=appJsonData["mapping"]
print(files)
#webApplication=webApplication(homepage,files,pyMapping)