version 1.9, 2003/12/19 13:58:52
|
version 1.13, 2004/01/09 12:47:04
|
Line 102 class OSAS_StoreOnline(SimpleItem):
|
Line 102 class OSAS_StoreOnline(SimpleItem):
|
def rescaleThumbs(self,path): |
def rescaleThumbs(self,path): |
"""rescale thumbs of imeages in path""" |
"""rescale thumbs of imeages in path""" |
|
|
os.popen("ssh nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat.pl %s /mpiwg/temp/online/scaled/thumb 90 >> /tmp/sc.out &"% re.sub('/mpiwg/online/','',self.REQUEST['path'])) |
os.popen("ssh nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat.pl %s /mpiwg/temp/online/scaled/thumb 90 --replace >> /tmp/sc.out &"% re.sub('/mpiwg/online/','',self.REQUEST['path'])) |
|
|
|
self.REQUEST.SESSION['path']=self.REQUEST['path'] |
|
#return self.REQUEST.RESPONSE.redirect(self.REQUEST['URL1']) |
|
pt=PageTemplateFile('Products/OSA_system/OSAS_scaled.zpt').__of__(self) |
|
return pt() |
|
|
|
|
def getfilesystem2(self,start,reload=0): |
def getfilesystem2(self,start,reload=0): |
"""load filesystem""" |
"""load filesystem""" |
Line 371 class filesystem(Implicit, Persistent, R
|
Line 377 class filesystem(Implicit, Persistent, R
|
|
|
def archive_the_path(self,path): |
def archive_the_path(self,path): |
"""parse indexmeta and return digilib path""" |
"""parse indexmeta and return digilib path""" |
|
|
try: |
try: |
#f = os.popen("cat "+path+"/index.meta","r") |
#f = os.popen("cat "+path+"/index.meta","r") |
f =file(path+"/index.meta","r") |
f =file(path+"/index.meta","r") |
Line 379 class filesystem(Implicit, Persistent, R
|
Line 386 class filesystem(Implicit, Persistent, R
|
|
|
try: |
try: |
dom = xml.dom.minidom.parseString(lines) |
dom = xml.dom.minidom.parseString(lines) |
|
if dom.getElementsByTagName("content-type"): |
if getText(dom.getElementsByTagName("content-type")[0].childNodes)=="folder": |
if getText(dom.getElementsByTagName("content-type")[0].childNodes)=="folder": |
"""folder nicht archivieren""" |
"""folder nicht archivieren""" |
return 0 |
return 0 |
else: |
|
archive_storage_date=getText(dom.getElementsByTagName("archive-storage-date")[0].childNodes) |
archive_storage_date=getText(dom.getElementsByTagName("archive-storage-date")[0].childNodes) |
|
|
if archive_storage_date=="": |
if archive_storage_date=="": |
Line 471 class filesystem2(Implicit, Persistent,
|
Line 479 class filesystem2(Implicit, Persistent,
|
|
|
def getfs(self,start): |
def getfs(self,start): |
"""load filessystem""" |
"""load filessystem""" |
|
|
f = os.popen("find "+ start+" -name '*' ","r") |
f = os.popen("find "+ start+" -name '*' ","r") |
lines = f.readlines() |
lines = f.readlines() |
|
|
Line 606 class browse(Implicit, Persistent, RoleM
|
Line 615 class browse(Implicit, Persistent, RoleM
|
|
|
def getfs(start): |
def getfs(start): |
"""return filesystem""" |
"""return filesystem""" |
|
|
|
|
f = os.popen("find "+ start+" -name '*'","r") |
f = os.popen("find "+ start+" -name '*'","r") |
lines = f.readlines() |
lines = f.readlines() |
return lines |
return lines |
Line 885 def getMetafile(path):
|
Line 896 def getMetafile(path):
|
f = os.popen("cat "+path+"/index.meta","r") |
f = os.popen("cat "+path+"/index.meta","r") |
lines = f.read() |
lines = f.read() |
dom = xml.dom.minidom.parseString(lines) |
dom = xml.dom.minidom.parseString(lines) |
|
try: |
name=getText(dom.getElementsByTagName("name")[0].childNodes) |
name=getText(dom.getElementsByTagName("name")[0].childNodes) |
|
except: |
|
name="NOT_DEFINED!!!" |
|
try: |
creator=getText(dom.getElementsByTagName("creator")[0].childNodes) |
creator=getText(dom.getElementsByTagName("creator")[0].childNodes) |
|
except: |
|
creator="NOT_DEFINED!!!" |
|
|
|
try: |
creation_date=getText(dom.getElementsByTagName("archive-creation-date")[0].childNodes) |
creation_date=getText(dom.getElementsByTagName("archive-creation-date")[0].childNodes) |
|
except: |
|
creation_date="NOT_DEFINED!!!" |
|
|
|
try: |
description=getText(dom.getElementsByTagName("description")[0].childNodes) |
description=getText(dom.getElementsByTagName("description")[0].childNodes) |
|
except: |
|
description="NOT_DEFINED!!!" |
|
|
try: |
try: |
type=getText(dom.getElementsByTagName("content-type")[0].childNodes) |
type=getText(dom.getElementsByTagName("content-type")[0].childNodes) |
except: |
except: |