version 1.7, 2004/01/07 10:46:30
|
version 1.9, 2004/01/08 17:00:39
|
Line 31 class OSAS_archiveInbox(SimpleItem,Persi
|
Line 31 class OSAS_archiveInbox(SimpleItem,Persi
|
self.title=title |
self.title=title |
self.pathes=[] |
self.pathes=[] |
|
|
def addPath(self,path): |
def addPath(self,path,RESPONSE=None): |
|
"""add a path""" |
today=time.localtime() |
today=time.localtime() |
self.pathes.append([path,today]) |
temp=self.pathes[0:] |
|
temp.append([path,today]) |
|
self.pathes=temp[0:] |
|
if RESPONSE: |
|
RESPONSE.redirect("index_html") |
|
|
def index_html(self): |
def index_html(self): |
"""main""" |
"""main""" |
Line 267 class OSAS_processViewer(SimpleItem,Pers
|
Line 272 class OSAS_processViewer(SimpleItem,Pers
|
return ret |
return ret |
|
|
def writefile(self,path,txt,REQUEST): |
def writefile(self,path,txt,REQUEST): |
|
"""writefile""" |
f=open(path,'w') |
f=open(path,'w') |
f.write(txt) |
f.write(txt) |
f.close() |
f.close() |
Line 312 class OSAS_archiver(Folder, Persistent,I
|
Line 318 class OSAS_archiver(Folder, Persistent,I
|
{'label':'Main Config','action':'changeOSAS_archiverForm'}, |
{'label':'Main Config','action':'changeOSAS_archiverForm'}, |
) |
) |
|
|
# to be deleted later |
def unarchive(self,path): |
#startPath="/mpiwg" |
"""unarchive the path""" |
|
f = os.popen("/usr/local/mpiwg/archive/unarchiver "+path,"r") |
|
return f.readlines() |
|
|
|
def checkIfUnarchive(self,path): |
|
if not os.path.exists(path+"/index.meta"): |
|
return 0 |
|
f=file(path+"/index.meta","r").read() |
|
dom=xml.dom.minidom.parseString(f) |
|
archiveStorageDates=dom.getElementsByTagName("archive-storage-date") |
|
if archiveStorageDates: |
|
return 1 |
|
else: |
|
return 0 |
|
|
## methoden aus dem alten archive.py |
## methoden aus dem alten archive.py |
|
|
|
|
|
|
|
|
def archiver(self,path): |
def archiver(self,path): |
"""archive the documents in path""" |
"""archive the documents in path""" |
tmp=archive.archive(path,self.REQUEST.SESSION) |
tmp=archive.archive(path,self.REQUEST.SESSION) |
pt=PageTemplateFile('Products/OSA_system/archiveStatus.zpt').__of__(self) |
pt=PageTemplateFile('Products/OSA_system/archiveStatus.zpt').__of__(self) |
return pt() |
return pt() |
|
|
|
def archive2(self): |
|
pt=PageTemplateFile('Products/OSA_system/archive2.zpt').__of__(self) |
|
return pt() |
|
|
|
|
def metachecker(self,path): |
def metachecker(self,path): |
Line 467 class OSAS_archiver(Folder, Persistent,I
|
Line 490 class OSAS_archiver(Folder, Persistent,I
|
return ret |
return ret |
|
|
def writefile(self,path,txt,REQUEST): |
def writefile(self,path,txt,REQUEST): |
|
"""writefile""" |
f=open(path,'w') |
f=open(path,'w') |
f.write(txt) |
f.write(txt) |
f.close() |
f.close() |
rval=self.aq_acquire('archive2') |
return self.archive2() |
return rval() |
|
|
|
def error(self): |
def error(self): |
"""view errors""" |
"""view errors""" |