--- OSAS/OSA_system/OSAS_add.py 2003/10/05 18:16:19 1.2 +++ OSAS/OSA_system/OSAS_add.py 2003/10/13 22:24:35 1.5 @@ -19,7 +19,7 @@ def add(self, no_upload=0): self.referencetypes=['Book','Journal Article','Manuscript'] - newtemplate=PageTemplateFile('products/OSA_system/OSAS_add_new').__of__(self) + newtemplate=PageTemplateFile('Products/OSA_system/OSAS_add_new').__of__(self) self.REQUEST.SESSION['path']=self.REQUEST['path'] if no_upload==0: self.REQUEST.SESSION['no_upload']='yes' @@ -33,7 +33,7 @@ def add(self, no_upload=0): def getISO(): - f=file('/Users/dwinter/Documents/Projekte/OSAS/OSA_system/iso639-1.inc','r').readlines() + f=file('/usr/local/mpiwg/Zope/lib/python/Products/OSA_system/iso639-1.inc','r').readlines() ret={} for lineraw in f: line=lineraw.encode('ascii','replace') @@ -57,7 +57,7 @@ def add2(self): #sorted=listed.sort() #print sorted - newtemplate=PageTemplateFile('products/OSA_system/OSAS_add_bibdata').__of__(self) + newtemplate=PageTemplateFile('Products/OSA_system/OSAS_add_bibdata').__of__(self) return newtemplate() #return self.fields @@ -97,7 +97,7 @@ def add3(self): self.REQUEST.SESSION['folder_name']=self.REQUEST.SESSION['path'] return add5(self) else: - newtemplate=PageTemplateFile('products/OSA_system/OSAS_add_naming').__of__(self) + newtemplate=PageTemplateFile('Products/OSA_system/OSAS_add_naming').__of__(self) return newtemplate() @@ -111,12 +111,12 @@ def add4(self): self.REQUEST.SESSION['folder_name']=self.folder_name self.image_folder_name="pageimg" - newtemplate=PageTemplateFile('products/OSA_system/OSAS_upload').__of__(self) + newtemplate=PageTemplateFile('Products/OSA_system/OSAS_upload').__of__(self) return newtemplate() def add5(self): """ADD INDEX.META""" - newtemplate=PageTemplateFile('products/OSA_system/OSAS_add_metadata').__of__(self) + newtemplate=PageTemplateFile('Products/OSA_system/OSAS_add_metadata').__of__(self) return newtemplate() def add6(self): @@ -133,7 +133,7 @@ def add6(self): for tag in self.metadata.keys(): self.metadataprint=self.metadataprint+"<"+tag+">"+self.metadata[tag]+"\n" - newtemplate=PageTemplateFile('products/OSA_system/index_meta').__of__(self) + newtemplate=PageTemplateFile('Products/OSA_system/index_meta').__of__(self) newtemplate.content_type="text/plain" renderxml = newtemplate() if self.REQUEST.SESSION.has_key('no_upload'): @@ -152,7 +152,7 @@ def add6(self): else: #print self.add_metadata['archive-path'] 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/OSAS_saved').__of__(self) newtemplate2.content_type="text/html" @@ -172,7 +172,8 @@ def addPresentation(self,path): """add presentation to the path""" dom=xml.dom.minidom.parse(path+"/index.meta") - + + try: author=archive.getText(dom.getElementsByTagName('author')[0].childNodes) except: @@ -197,7 +198,7 @@ def addPresentation(self,path): yes """%(author,title,date) - newtemplate=PageTemplateFile('products/OSA_system/addPresentation').__of__(self) + newtemplate=PageTemplateFile('Products/OSA_system/addPresentation').__of__(self) return newtemplate() def addPresentation2(self): @@ -222,7 +223,7 @@ def addPresentation2(self): os.mkdir(path+"/"+folder_name) except: """nothing""" - print "NAME:",file_name + #print "NAME:",file_name f=open(path+"/"+folder_name+"/"+file_name,"w") f.write(xmlinfo) f.close() @@ -236,7 +237,7 @@ def addText(self,path): """add fulltext to the path""" self.REQUEST.SESSION['existing_names']=['pageimg'] # to be done generate list of existing text files self.REQUEST.SESSION['path']=path - newtemplate=PageTemplateFile('products/OSA_system/addText').__of__(self) + newtemplate=PageTemplateFile('Products/OSA_system/addText').__of__(self) return newtemplate() def addText2(self): @@ -335,13 +336,13 @@ def addTextExternal(self,path,texturl,ve writefile.close() #registrieren - print 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 "DONE:"+textpath+"/"+name def TextExternalError(text): firsts=text[0:10] - print firsts + #print firsts try: match=re.search(r".*