version 1.10, 2005/02/14 18:15:16
|
version 1.13, 2005/03/07 19:33:42
|
Line 19 class OSAS_storeOnlineServer(SimpleItem)
|
Line 19 class OSAS_storeOnlineServer(SimpleItem)
|
|
|
meta_type="OSAS_server" |
meta_type="OSAS_server" |
|
|
|
def getImages(self,path): |
|
"""hack""" |
|
imageEnding=['.gif','.jpg','.jpeg','.png','.tiff','.tif'] |
|
|
|
dirs=os.listdir(path) |
|
ret=[] |
|
|
|
for dir in dirs: |
|
|
|
if os.path.isdir(os.path.join(path,dir)): |
|
|
|
for subdir in os.listdir(os.path.join(path,dir)): |
|
if os.path.splitext(subdir)[1].lower() in imageEnding: |
|
ret.append(os.path.join(dir,subdir)) |
|
else: |
|
if os.path.splitext(dir)[1] in imageEnding: |
|
ret.append(os.path.join(dir)) |
|
return ret |
|
|
|
|
|
def getMovies(self,path): |
|
"""hack""" |
|
movieEnding=['.dv','.mov','.mp4'] |
|
dirs=os.listdir(path) |
|
ret=[] |
|
for dir in dirs: |
|
if os.path.isdir(os.path.join(path,dir)): |
|
for subdir in os.listdir(os.path.join(path,dir)): |
|
if os.path.splitext(subdir)[1].lower() in movieEnding: |
|
ret.append(os.path.join(dir,subdir)) |
|
else: |
|
if os.path.splitext(dir)[1] in movieEnding: |
|
ret.append(os.path.join(dir)) |
|
return ret |
|
|
|
|
def findIndexMeta(self,realPath=""): |
def findIndexMeta(self,realPath=""): |
"""finde Rueckwaerts im Baum von Pfad ausgehend, dass erste index.meta file |
"""finde Rueckwaerts im Baum von Pfad ausgehend, dass erste index.meta file |
Line 108 class OSAS_storeOnlineServer(SimpleItem)
|
Line 143 class OSAS_storeOnlineServer(SimpleItem)
|
ret[dir]=(fileType,None) |
ret[dir]=(fileType,None) |
return ret |
return ret |
|
|
|
def writeMetaDataFile(self,path,metadata): |
|
"""writefiletoserver""" |
|
try: |
|
fh=file(path,"w") |
|
fh.write(metadata) |
|
fh.close |
|
return True |
|
except: |
|
return False |
|
|
|
|
def manage_addOSAS_storeOnlineServerForm(self): |
def manage_addOSAS_storeOnlineServerForm(self): |