Diff for /OSAS/OSA_system/OSAS_add.py between versions 1.11 and 1.12

version 1.11, 2004/03/01 17:44:29 version 1.12, 2004/03/03 13:02:54
Line 9  from Products.PageTemplates.PageTemplate Line 9  from Products.PageTemplates.PageTemplate
 import string  import string
 import urllib  import urllib
 import xml.dom.minidom  import xml.dom.minidom
   from time import localtime,strftime
   
 #referencetypes=['Book','Bic','Journal Article','Manuscript','jiji']  #referencetypes=['Book','Bic','Journal Article','Manuscript','jiji']
   
Line 19  def add(self, no_upload=0): Line 20  def add(self, no_upload=0):
                   
     self.referencetypes=['Book','Journal Article','Manuscript']      self.referencetypes=['Book','Journal Article','Manuscript']
   
     newtemplate=PageTemplateFile('Products/OSA_system/OSAS_add_new').__of__(self)      newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_add_new').__of__(self)
         self.REQUEST.SESSION['path']=self.REQUEST['path']          self.REQUEST.SESSION['path']=self.REQUEST['path']
     if no_upload==0:      if no_upload==0:
         self.REQUEST.SESSION['no_upload']='yes'          self.REQUEST.SESSION['no_upload']='yes'
Line 64  def add2(self): Line 65  def add2(self):
         #sorted=listed.sort()          #sorted=listed.sort()
     #print sorted      #print sorted
           
     newtemplate=PageTemplateFile('Products/OSA_system/OSAS_add_bibdata').__of__(self)      newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_add_bibdata').__of__(self)
     return newtemplate()      return newtemplate()
     #return self.fields      #return self.fields
   
Line 104  def add3(self): Line 105  def add3(self):
         self.REQUEST.SESSION['folder_name']=self.REQUEST.SESSION['path']          self.REQUEST.SESSION['folder_name']=self.REQUEST.SESSION['path']
         return add5(self)          return add5(self)
     else:      else:
         newtemplate=PageTemplateFile('Products/OSA_system/OSAS_add_naming').__of__(self)          newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_add_naming').__of__(self)
         return newtemplate()          return newtemplate()
           
   
Line 118  def add4(self): Line 119  def add4(self):
   
     self.REQUEST.SESSION['folder_name']=self.folder_name      self.REQUEST.SESSION['folder_name']=self.folder_name
     self.image_folder_name="pageimg"      self.image_folder_name="pageimg"
     newtemplate=PageTemplateFile('Products/OSA_system/OSAS_upload').__of__(self)      newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_upload').__of__(self)
     return newtemplate()      return newtemplate()
           
 def add5(self):  def add5(self):
     """ADD INDEX.META"""      """ADD INDEX.META"""
     newtemplate=PageTemplateFile('Products/OSA_system/OSAS_add_metadata').__of__(self)      newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_add_metadata').__of__(self)
     return newtemplate()      return newtemplate()
   
 def add6(self):  def add6(self):
Line 140  def add6(self): Line 141  def add6(self):
     for tag in self.metadata.keys():      for tag in self.metadata.keys():
         self.metadataprint=self.metadataprint+"<"+tag+">"+self.metadata[tag]+"</"+tag+">\n"          self.metadataprint=self.metadataprint+"<"+tag+">"+self.metadata[tag]+"</"+tag+">\n"
   
     newtemplate=PageTemplateFile('Products/OSA_system/index_meta').__of__(self)      newtemplate=PageTemplateFile('Products/OSA_system/zpt/index_meta').__of__(self)
     newtemplate.content_type="text/plain"      newtemplate.content_type="text/plain"
     renderxml = newtemplate()      renderxml = newtemplate()
     if self.REQUEST.SESSION.has_key('no_upload'):      if self.REQUEST.SESSION.has_key('no_upload'):
Line 160  def add6(self): Line 161  def add6(self):
     else:      else:
                 #print self.add_metadata['archive-path']                  #print self.add_metadata['archive-path']
         self.viewpath=re.search(r"/mpiwg/online/(.*)",self.add_metadata['archive-path']).group(1)           self.viewpath=re.search(r"/mpiwg/online/(.*)",self.add_metadata['archive-path']).group(1) 
         newtemplate2=PageTemplateFile('Products/OSA_system/OSAS_saved').__of__(self)          newtemplate2=PageTemplateFile('Products/OSA_system/zpt/OSAS_saved').__of__(self)
           
                   
         newtemplate2.content_type="text/html"          newtemplate2.content_type="text/html"
Line 170  def add6(self): Line 171  def add6(self):
         return newtemplate2()          return newtemplate2()
   
   
 from time import localtime,strftime  
   
 def date(self):  def date(self):
     return strftime("%d.%m.%Y",localtime())       return strftime("%d.%m.%Y",localtime()) 
Line 210  def addPresentation(self,path): Line 211  def addPresentation(self,path):
     <display>yes</display>      <display>yes</display>
 </info>"""%(author,title,date)  </info>"""%(author,title,date)
           
     newtemplate=PageTemplateFile('Products/OSA_system/addPresentation').__of__(self)      newtemplate=PageTemplateFile('Products/OSA_system/zpt/addPresentation').__of__(self)
     return newtemplate()      return newtemplate()
   
 def addPresentation2(self):  def addPresentation2(self):
Line 249  def addText(self,path): Line 250  def addText(self,path):
     """add fulltext to the path"""      """add fulltext to the path"""
     self.REQUEST.SESSION['existing_names']=['pageimg'] # to be done generate list of existing text files      self.REQUEST.SESSION['existing_names']=['pageimg'] # to be done generate list of existing text files
     self.REQUEST.SESSION['path']=path      self.REQUEST.SESSION['path']=path
     newtemplate=PageTemplateFile('Products/OSA_system/addText').__of__(self)      newtemplate=PageTemplateFile('Products/OSA_system/zpt/addText').__of__(self)
     return newtemplate()      return newtemplate()
   
 def addText2(self):  def addText2(self):
Line 373  def addImages(self,path): Line 374  def addImages(self,path):
     """Imagesfolder to the path"""      """Imagesfolder to the path"""
     self.REQUEST.SESSION['existing_names']=['pageimg'] # to be done generate list of existing pageimages files      self.REQUEST.SESSION['existing_names']=['pageimg'] # to be done generate list of existing pageimages files
     self.REQUEST.SESSION['path']=path      self.REQUEST.SESSION['path']=path
     newtemplate=PageTemplateFile('Products/OSA_system/OSAS_addImages').__of__(self)      newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_addImages').__of__(self)
     return newtemplate()      return newtemplate()
   
 def addImages2(self):  def addImages2(self):
Line 387  def addImages2(self): Line 388  def addImages2(self):
     self.content_type='images'      self.content_type='images'
     addDirsToIndexMeta(self.REQUEST.SESSION['path'],self.image_folder_name,self.content_description,self.content_type)      addDirsToIndexMeta(self.REQUEST.SESSION['path'],self.image_folder_name,self.content_description,self.content_type)
     self.REQUEST.SESSION['path']=re.search(r"/mpiwg(.*)",self.REQUEST.SESSION['path']).group(1)      self.REQUEST.SESSION['path']=re.search(r"/mpiwg(.*)",self.REQUEST.SESSION['path']).group(1)
     newtemplate=PageTemplateFile('Products/OSA_system/OSAS_upload2').__of__(self)      newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_upload2').__of__(self)
     return newtemplate()      return newtemplate()
           
   
Line 440  def readArchimedesXML(folder): Line 441  def readArchimedesXML(folder):
         return dict[folder]          return dict[folder]
     else:      else:
         return ""          return ""
       
 def combineTextImage(self,path):  def combineTextImage(self,path):
     """gibt input formular zur erstellung des texttools meta tag aus"""      """gibt input formular zur erstellung des texttools meta tag aus"""
     files = os.listdir(path)      files = os.listdir(path)

Removed from v.1.11  
changed lines
  Added in v.1.12


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