Diff for /OSAS/OSA_system/OSAS_add.py between versions 1.6 and 1.9

version 1.6, 2003/12/05 14:57:03 version 1.9, 2004/01/21 07:43:01
Line 33  def add(self, no_upload=0): Line 33  def add(self, no_upload=0):
   
   
 def getISO():  def getISO():
       try:
         f=file('/usr/local/mpiwg/Zope/lib/python/Products/OSA_system/iso639-1.inc','r').readlines()          f=file('/usr/local/mpiwg/Zope/lib/python/Products/OSA_system/iso639-1.inc','r').readlines()
           #f=file('OSA_system/iso639-1.inc','r').readlines()
     ret={}      ret={}
     for lineraw in f:      for lineraw in f:
         line=lineraw.encode('ascii','replace')          line=lineraw.encode('ascii','replace')
Line 41  def getISO(): Line 43  def getISO():
         key=string.split(line,'\t')[1].encode('ascii','replace')          key=string.split(line,'\t')[1].encode('ascii','replace')
                   
         ret[key]=value          ret[key]=value
       except:
           ret={}
         return ret          return ret
   
 def add2(self):  def add2(self):
Line 177  def addPresentation(self,path): Line 181  def addPresentation(self,path):
     try:      try:
         author=archive.getText(dom.getElementsByTagName('author')[0].childNodes)          author=archive.getText(dom.getElementsByTagName('author')[0].childNodes)
     except:      except:
           try:
         author=archive.getText(dom.getElementsByTagName('Author')[0].childNodes)          author=archive.getText(dom.getElementsByTagName('Author')[0].childNodes)
           except:
               author=archive.getText(dom.getElementsByTagName('Editor')[0].childNodes)
               
     title=archive.getText(dom.getElementsByTagName('title')[0].childNodes)      title=archive.getText(dom.getElementsByTagName('title')[0].childNodes)
     try:      try:
         date=archive.getText(dom.getElementsByTagName('year')[0].childNodes)          date=archive.getText(dom.getElementsByTagName('year')[0].childNodes)
Line 521  def combineTextImage2(self,path): Line 529  def combineTextImage2(self,path):
         presentationnode.appendChild(presentationnodetext)          presentationnode.appendChild(presentationnodetext)
         subnode.appendChild(presentationnode)          subnode.appendChild(presentationnode)
           
   
       if self.REQUEST.has_key('xslt'):
           if not self.REQUEST['xslt']=="":
               xsltnode=dom.createElement('xslt')
               xsltnodetext=dom.createTextNode(self.REQUEST['xslt'])
               xsltnode.appendChild(xsltnodetext)
               subnode.appendChild(xsltnode)
   
     node.appendChild(subnode)      node.appendChild(subnode)
           
     try:      try:
Line 565  def combineTextImage2(self,path): Line 581  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()
     #return urllib.quote("http://nausikaa2.rz-berlin.mpg.de:86/cgi-bin/toc/admin/reg.cgi?path=%s"%path)      #return urllib.quote("http://nausikaa2.rz-berlin.mpg.de:86/cgi-bin/toc/admin/reg.cgi?path=%s"%path)
     os.popen("ssh nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat.pl %s /mpiwg/temp/online/scaled/thumb 90 &"% re.sub('mpiwg/online/','',self.REQUEST['path']+"/"+self.REQUEST['image']))      os.popen("ssh nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat.pl %s /mpiwg/temp/online/scaled/thumb 90 >> /tmp/sc.out &"% re.sub('/mpiwg/online/','',self.REQUEST['path']+"/"+self.REQUEST['image']))
           
     #return self.REQUEST.RESPONSE.redirect(self.REQUEST['URL2']+'?path='+self.REQUEST['path'])      #return self.REQUEST.RESPONSE.redirect(self.REQUEST['URL2']+'?path='+self.REQUEST['path'])
           

Removed from v.1.6  
changed lines
  Added in v.1.9


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