--- ECHO_content/ECHO_collection.py 2010/02/15 19:03:28 1.308 +++ ECHO_content/ECHO_collection.py 2010/10/11 13:15:00 1.309 @@ -1003,7 +1003,7 @@ class ECHO_collection(CatalogAware, Fold pass return ret - def importCollection(self,path=None,RESPONSE=None): + def importCollection(self,path=None,viewerUrl=None,metaDataUrl=None,replacePathPermanent=None,replacePathExperimental=None,RESPONSE=None): """liest verzeichnisse aus dem pfad und legt sie dann als objekte in den ordner""" if path is None: @@ -1016,15 +1016,20 @@ class ECHO_collection(CatalogAware, Fold if fileName: - tempPath=re.sub("/mpiwg/online","",path) - link="http://echo.mpiwg-berlin.mpg.de/zogilib_book?fn="+tempPath+"/"+fileName+"/pageimg" + if (replacePathExperimental and replacePathExperimental!=''): + path=re.sub(replacePathExperimental,"/mpiwg/online/experimental",path) + + if (replacePathPermanent and replacePathPermanent!=''): + path=re.sub(replacePathPermanent,"/mpiwg/online/permanent",path) + + link=viewerUrl%(path+"/"+fileName+"/pageimg") - metalink=self.path+"/"+fileName+"/index.meta" + metalink=metaDataUrl+"/"+path+"/"+fileName+"/index.meta" try: #link="http://nausikaa2.mpiwg-berlin.mpg.de/cgi-bin/toc/toc.x.cgi?dir="+fileName+"&step=thumb" - newObj=ECHO_resource(fileName,link,metalink,fileName,fileName,fileName,'generated','book','','','','','','') + newObj=ECHO_resource(fileName,link,metalink,fileName,fileName,fileName,'','book','','','','','','') self._setObject(fileName,newObj) genObj=getattr(self,fileName)