Mercurial > hg > documentViewer
comparison documentViewer.py @ 79:df6952ac93e9 Root_integrate_imageArchive
bug in getDocInforFromImagePath, relative lage der index.meta zu path war falsch.
author | dwinter |
---|---|
date | Mon, 09 Mar 2009 09:37:19 +0100 |
parents | 70ab234a18dc |
children | fae97f071724 |
comparison
equal
deleted
inserted
replaced
78:70ab234a18dc | 79:df6952ac93e9 |
---|---|
382 | 382 |
383 if dom is None: | 383 if dom is None: |
384 for x in range(cut): | 384 for x in range(cut): |
385 path=getParentDir(path) | 385 path=getParentDir(path) |
386 dom = self.getIndexMeta(path) | 386 dom = self.getIndexMeta(path) |
387 | 387 |
388 logging.debug("documentViewer (getbibinfofromindexmeta cutted) path: %s"%(path)) | |
388 # put in all raw bib fields as dict "bib" | 389 # put in all raw bib fields as dict "bib" |
389 bib = dom.xpath("//bib/*") | 390 bib = dom.xpath("//bib/*") |
390 if bib and len(bib)>0: | 391 if bib and len(bib)>0: |
391 bibinfo = {} | 392 bibinfo = {} |
392 for e in bib: | 393 for e in bib: |
537 docinfo = {} | 538 docinfo = {} |
538 path=path.replace("/mpiwg/online","") | 539 path=path.replace("/mpiwg/online","") |
539 docinfo['imagePath'] = path | 540 docinfo['imagePath'] = path |
540 docinfo=self.getDirinfoFromDigilib(path,docinfo=docinfo,cut=cut) | 541 docinfo=self.getDirinfoFromDigilib(path,docinfo=docinfo,cut=cut) |
541 | 542 |
543 pathorig=path | |
542 for x in range(cut): | 544 for x in range(cut): |
543 path=getParentDir(path) | 545 path=getParentDir(path) |
544 logging.error("PATH:"+path) | 546 logging.error("PATH:"+path) |
545 imageUrl=self.digilibBaseUrl+"/servlet/Scaler?fn="+path | 547 imageUrl=self.digilibBaseUrl+"/servlet/Scaler?fn="+path |
546 docinfo['imageURL'] = imageUrl | 548 docinfo['imageURL'] = imageUrl |
547 | 549 |
548 docinfo = self.getBibinfoFromIndexMeta(path,docinfo=docinfo,cut=cut) | 550 #path ist the path to the images it assumes that the index.meta file is one level higher. |
549 docinfo = self.getAuthinfoFromIndexMeta(path,docinfo=docinfo,cut=cut) | 551 docinfo = self.getBibinfoFromIndexMeta(pathorig,docinfo=docinfo,cut=cut+1) |
552 docinfo = self.getAuthinfoFromIndexMeta(pathorig,docinfo=docinfo,cut=cut+1) | |
550 return docinfo | 553 return docinfo |
551 | 554 |
552 | 555 |
553 def getDocinfo(self, mode, url): | 556 def getDocinfo(self, mode, url): |
554 """returns docinfo depending on mode""" | 557 """returns docinfo depending on mode""" |