version 1.1, 2003/10/05 19:11:09
|
version 1.6, 2004/01/09 12:47:05
|
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 239 class filesystem2(Implicit, Persistent,
|
Line 240 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 375 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 530 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 636 def getText(nodelist):
|
Line 640 def getText(nodelist):
|
|
|
rc = "" |
rc = "" |
for node in nodelist: |
for node in nodelist: |
|
|
if node.nodeType == node.TEXT_NODE: |
if node.nodeType == node.TEXT_NODE: |
rc = rc + node.data |
rc = rc + node.data |
return rc |
return rc |
|
|
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 685 def getMetafile(path):
|
Line 690 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 734 def isdigilib2(path):
|
Line 739 def isdigilib2(path):
|
|
|
def isFullText(path,folder_name): |
def isFullText(path,folder_name): |
"""check if foldername in path is full text""" |
"""check if foldername in path is full text""" |
|
|
try: |
try: |
dom=xml.dom.minidom.parse(path+"/index.meta") |
dom=xml.dom.minidom.parse(path+"/index.meta") |
|
except: |
|
""" nothing""" |
|
return 0 |
for node in dom.getElementsByTagName("dir"): |
for node in dom.getElementsByTagName("dir"): |
|
|
if getText(node.getElementsByTagName("content-type")[0].childNodes)=="fulltext": |
try: |
|
child=getText(node.getElementsByTagName("content-type")[0].childNodes) |
|
|
|
if child =="fulltext": |
|
|
if getText(node.getElementsByTagName("name")[0].childNodes)==folder_name: |
if getText(node.getElementsByTagName("name")[0].childNodes)==folder_name: |
return 1 |
return 1 |
return 0 |
|
except: |
except: |
|
"""nothing""" |
|
#print "erro",node |
|
#print sys.exc_info() |
|
#return 0 |
|
|
return 0 |
return 0 |
|
|
|
|
|
|
def isPresentation(path,folder_name): |
def isPresentation(path,folder_name): |
"""check if foldername in path is full text""" |
"""check if foldername in path is full text""" |
try: |
try: |
Line 938 def EditIndex2(self):
|
Line 954 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() |