Diff for /OSAS/OSA_system/OSAS_add.py between versions 1.47 and 1.52

version 1.47, 2006/06/14 16:13:53 version 1.52, 2008/09/05 11:42:55
Line 14  from Products.PageTemplates.PageTemplate Line 14  from Products.PageTemplates.PageTemplate
 from Products.PageTemplates.PageTemplate import PageTemplate  from Products.PageTemplates.PageTemplate import PageTemplate
 import string  import string
 import urllib  import urllib
 import zLOG  import logging
   
   #ersetzt logging
   def logger(txt,method,txt2):
       """logging"""
       logging.info(txt+ txt2)
   
   
 import xml.dom.minidom  import xml.dom.minidom
 from time import localtime,strftime  from time import localtime,strftime
 from Globals import package_home  from Globals import package_home
Line 577  def combineTextImage2(self,path): Line 584  def combineTextImage2(self,path):
         subnode=dom.createElement('texttool') #neu erzeugen          subnode=dom.createElement('texttool') #neu erzeugen
   
                   
         presentfile=os.listdir(path+"/"+self.REQUEST['presentation'])[0]          presentfiles=os.listdir(path+"/"+self.REQUEST['presentation'])
           for presentfileTmp in presentfiles:
               if (presentfileTmp[0]!="."): #schliesse unsichbare DAteien aus.
                   presentfile=presentfileTmp
                   
   
         displaynode=dom.createElement('display')          displaynode=dom.createElement('display')
Line 700  def combineTextImage2(self,path): Line 710  def combineTextImage2(self,path):
                   
                   
   
         urllib.urlopen("http://nausikaa2.rz-berlin.mpg.de:86/cgi-bin/toc/admin/reg.cgi?path=%s"%path).readlines()  #        urllib.urlopen("http://nausikaa2.rz-berlin.mpg.de:86/cgi-bin/toc/admin/reg.cgi?path=%s"%path).readlines()
   #
   #        if self.REQUEST.has_key('image'): # falls bilder
   #                path=re.sub('//','/',self.REQUEST['path']) # falls '//' im Pfad
   #                dlpath = re.sub('/mpiwg/online/','',path)+"/"+self.REQUEST['image']
   #
   #                logger('OSas',logging.INFO,"ssh archive@nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat -src=/mpiwg/online -dest=/mpiwg/temp/online/scaled/thumb -dir=%s -scaleto=90 -sync >> /tmp/sc.out &"%dlpath )
   #                ret=os.popen("ssh archive@nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat -src=/mpiwg/online -dest=/mpiwg/temp/online/scaled/thumb -dir=%s -scaleto=90 -sync >> /tmp/sc.out &"%dlpath ).read()
   #                logger('OSAS (combine)',logging.INFO,ret)
   
         if self.REQUEST.has_key('image'): # falls bilder  
                 path=re.sub('//','/',self.REQUEST['path']) # falls '//' im Pfad  
                 dlpath = re.sub('/mpiwg/online/','',path)+"/"+self.REQUEST['image']  
   
                 zLOG.LOG('OSas',zLOG.INFO,"ssh archive@nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat -src=/mpiwg/online -dest=/mpiwg/temp/online/scaled/thumb -dir=%s -scaleto=90 -sync >> /tmp/sc.out &"%dlpath )  
                 ret=os.popen("ssh archive@nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat -src=/mpiwg/online -dest=/mpiwg/temp/online/scaled/thumb -dir=%s -scaleto=100 -sync >> /tmp/sc.out &"%dlpath ).read()  
                 zLOG.LOG('OSAS (combine)',zLOG.INFO,ret)  
   
           #else: # falls keine Bilder (bug in reg.cgi info file ersetzen)
           #        f=file("/tmp/tmp_info.xml","w")
         else: # falls keine Bilder (bug in reg.cgi info file ersetzen)          #        tmp=patchedInfoXML(self.REQUEST['path'])
                 f=file("/tmp/tmp_info.xml","w")          #        f.write(tmp.encode('utf-8'))
                 tmp=patchedInfoXML(self.REQUEST['path'])          #        f.close()
                 f.write(tmp.encode('utf-8'))          #        splitted=path.split("/")
                 f.close()          #        fn=splitted[len(splitted)-1]
                 splitted=path.split("/")          #        remotePath="archive@nausikaa2.rz-berlin.mpg.de:/usr/local/share/archimedes/web/docs/proj/echo/1/docs/"+fn+"/info.xml"
                 fn=splitted[len(splitted)-1]          #        os.popen("scp /tmp/tmp_info.xml %s"%remotePath)
                 remotePath="archive@nausikaa2.rz-berlin.mpg.de:/usr/local/share/archimedes/web/docs/proj/echo/1/docs/"+fn+"/info.xml"  
                 os.popen("scp /tmp/tmp_info.xml %s"%remotePath)  
   
 def patchedInfoXML(path):  def patchedInfoXML(path):
         dom=xml.dom.minidom.parse(path+"/index.meta")          dom=xml.dom.minidom.parse(path+"/index.meta")

Removed from v.1.47  
changed lines
  Added in v.1.52


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