Diff for /OSA_system2/OSAS_helpers.py between versions 1.1.1.1 and 1.4

version 1.1.1.1, 2004/11/29 09:48:07 version 1.4, 2005/02/11 16:27:01
Line 2 Line 2
 import os.path  import os.path
 from types import *  from types import *
 import xml.dom.minidom  import xml.dom.minidom
   import zLOG
   
 OSASObjectTypes=['OSAS_metaDataFile','OSAS_dir','OSAS_file','OSAS_imageFolder']  OSASObjectTypes=['OSAS_metaDataFile','OSAS_dir','OSAS_file','OSAS_imageFolder','OSAS_dir_archive','OSAS_file_archive']
 OSASExcludedFiles=['TheVolumeSettingsFolder','TheFindByContentFolder']  OSASExcludedFiles=['TheVolumeSettingsFolder','TheFindByContentFolder']
   
   
 def getText(nodelist):  def getText(nodelist):
     """gibt text aus nodelist"""      """gibt text aus nodelist"""
     rc = ""      rc = ""
Line 14  def getText(nodelist): Line 16  def getText(nodelist):
            rc = rc + node.data             rc = rc + node.data
     return rc      return rc
   
 def getMetaFile(path):  def getMetaInfoFromXML(path,xmlInfo):
     """get index.meta and translate it to HTML"""      """get index.meta and translate it to HTML"""
     html=[]      html=[]
     if not os.path.exists(path+"/index.meta"):  
                       
           return "NO_METADATA"      dom = xml.dom.minidom.parseString(xmlInfo)
     else:  
        f = os.popen("cat "+path+"/index.meta","r")  
        lines = f.read()  
        dom = xml.dom.minidom.parseString(lines)  
        try:         try:
            name=getText(dom.getElementsByTagName("name")[0].childNodes)             name=getText(dom.getElementsByTagName("name")[0].childNodes)
        except:         except:
Line 69  def getMetaFile(path): Line 66  def getMetaFile(path):
                 
 #        html=html.encode('utf-8','replace')+getBib(bib.childNodes).encode('utf-8','replace')  #        html=html.encode('utf-8','replace')+getBib(bib.childNodes).encode('utf-8','replace')
                 
        return html.encode('utf-8')      
       return html
   
   
 def getBib(nodelist):  def getBib(nodelist):
     """ translate bibliographical entries """      """ translate bibliographical entries """

Removed from v.1.1.1.1  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>