version 1.2, 2003/10/13 22:24:35
|
version 1.9, 2004/03/03 13:02:54
|
Line 75 class filesystem(Implicit, Persistent, R
|
Line 75 class filesystem(Implicit, Persistent, R
|
|
|
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 137 class filesystem(Implicit, Persistent, R
|
Line 138 class filesystem(Implicit, Persistent, R
|
j[k]=self.node[k] |
j[k]=self.node[k] |
return j |
return j |
|
|
|
|
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: |
Line 176 class filesystem(Implicit, Persistent, R
|
Line 178 class filesystem(Implicit, Persistent, R
|
if self.archive_the_path(k): |
if self.archive_the_path(k): |
j[k]=self.node[k] |
j[k]=self.node[k] |
return j |
return j |
|
|
security.declarePublic('getImageDirs') |
security.declarePublic('getImageDirs') |
def getImageDirs(self,dom,path): |
def getImageDirs(self,dom,path): |
dirs=dom.getElementsByTagName("dir") |
dirs=dom.getElementsByTagName("dir") |
Line 239 class filesystem2(Implicit, Persistent,
|
Line 242 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 373 class browse(Implicit, Persistent, RoleM
|
Line 377 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 527 class metacheck(Implicit, Persistent, Ro
|
Line 532 class metacheck(Implicit, Persistent, Ro
|
return [retstr,error] |
return [retstr,error] |
else: |
else: |
return ['','running'] |
return ['','running'] |
|
|
def __init__(self,path): |
def __init__(self,path): |
"""archive the documents in path""" |
"""archive the documents in path""" |
self.lines=[] |
self.lines=[] |
Line 643 def getText(nodelist):
|
Line 649 def getText(nodelist):
|
|
|
def getBib(nodelist): |
def getBib(nodelist): |
rc= "<table border='0'>" |
rc= "<table border='0'>" |
print "HI" |
|
for node in nodelist: |
for node in nodelist: |
|
|
if node.nodeType == node.ELEMENT_NODE: |
if node.nodeType == node.ELEMENT_NODE: |
Line 686 def getMetafile(path):
|
Line 692 def getMetafile(path):
|
else: |
else: |
html=html+"<h4>Info</h4>" |
html=html+"<h4>Info</h4>" |
html=html+getBib(bib.childNodes) |
html=html+getBib(bib.childNodes) |
print html |
#print html |
except: |
except: |
"""none""" |
"""none""" |
|
|
Line 865 class overview(Implicit,Persistent, Role
|
Line 871 class overview(Implicit,Persistent, Role
|
if not len(str)==0: |
if not len(str)==0: |
for line in str: |
for line in str: |
retstr=retstr+line+"<br>" |
retstr=retstr+line+"<br>" |
check=re.search(r"(.*):(.*)",line) |
check=line.split(":") |
if check.group(1)=='ABORT': |
#re.search(r"(.*):(.*)",line) |
|
if check[0]=='ABORT': |
error="error" |
error="error" |
elif check.group(1)=='DONE': |
elif check[0]=='DONE': |
error="ok" |
error="ok" |
else: |
else: |
error="running" |
error="running" |
Line 943 def EditIndex(self,path):
|
Line 950 def EditIndex(self,path):
|
indexmeta="" |
indexmeta="" |
self.REQUEST.SESSION['indexmeta']=indexmeta |
self.REQUEST.SESSION['indexmeta']=indexmeta |
self.REQUEST.SESSION['path']=path |
self.REQUEST.SESSION['path']=path |
newtemplate=PageTemplateFile('/usr/local/mpiwg/Zope/Extensions/editindex').__of__(self) |
newtemplate=PageTemplateFile('Products/OSA_system/zpt/editindex').__of__(self) |
return newtemplate() |
return newtemplate() |
|
|
def EditIndex2(self): |
def EditIndex2(self): |
if not self.REQUEST.has_key('fileupload'): |
if not self.REQUEST.has_key('fileupload'): |
#newtext=urllib.unquote(self.REQUEST['indexmeta']) |
#newtext=urllib.unquote(self.REQUEST['indexmeta']) |
newtext=self.REQUEST['indexmeta'] |
newtext=self.REQUEST['indexmeta'] |
print newtext |
#print newtext |
else: |
else: |
self.file_name=self.REQUEST['fileupload'].filename |
self.file_name=self.REQUEST['fileupload'].filename |
#newtext=self.REQUEST.form['fileupload'].read() |
#newtext=self.REQUEST.form['fileupload'].read() |