|
|
| version 1.122, 2010/10/15 12:01:46 | version 1.142, 2010/10/18 12:11:34 |
|---|---|
| Line 243 class documentViewer(Folder): | Line 243 class documentViewer(Folder): |
| self.digilibBaseUrl = self.findDigilibUrl() or "http://nausikaa.mpiwg-berlin.mpg.de/digitallibrary" | self.digilibBaseUrl = self.findDigilibUrl() or "http://nausikaa.mpiwg-berlin.mpg.de/digitallibrary" |
| docinfo = self.getDocinfo(mode=mode,url=url) | docinfo = self.getDocinfo(mode=mode,url=url) |
| #pageinfo = self.getPageinfo(start=start,current=pn,docinfo=docinfo) | |
| pageinfo = self.getPageinfo(start=start,current=pn,docinfo=docinfo) | pageinfo = self.getPageinfo(start=start,current=pn,docinfo=docinfo) |
| ''' ZDES ''' | |
| pt = getattr(self.template, 'thumbs_main_rss') | pt = getattr(self.template, 'thumbs_main_rss') |
| if viewMode=="auto": # automodus gewaehlt | if viewMode=="auto": # automodus gewaehlt |
| Line 569 class documentViewer(Folder): | Line 571 class documentViewer(Folder): |
| path=getParentDir(path) | path=getParentDir(path) |
| dom = self.getDomFromIndexMeta(path) | dom = self.getDomFromIndexMeta(path) |
| #docinfo['indexMetaPath']=self.getIndexMetaPath(path); | |
| #result= dom.xpath("//result/resultPage") | |
| #docinfo['numPages']=int(getTextFromNode(result[0])) | |
| #result =dom.xpath("//name") | |
| docinfo['name']=getTextFromNode(dom.xpath("/resource/name")[0]) | docinfo['name']=getTextFromNode(dom.xpath("/resource/name")[0]) |
| logging.debug("documentViewer docinfo[name] %s"%docinfo['name']) | logging.debug("documentViewer docinfo[name] %s"%docinfo['name']) |
| #logging.debug("documentViewer (getbibinfofromindexmeta) using mapping for %s"%bibtype) | |
| return docinfo | return docinfo |
| def getDocinfoFromTextTool(self, url, dom=None, docinfo=None): | def getDocinfoFromTextTool(self, url, dom=None, docinfo=None): |
| Line 668 class documentViewer(Folder): | Line 662 class documentViewer(Folder): |
| presentationUrls = dom.xpath("//texttool/presentation") | presentationUrls = dom.xpath("//texttool/presentation") |
| docinfo = self.getBibinfoFromIndexMeta(url, docinfo=docinfo, dom=dom) # get info von bib tag | docinfo = self.getBibinfoFromIndexMeta(url, docinfo=docinfo, dom=dom) # get info von bib tag |
| docinfo = self.getNameFromIndexMeta(url, docinfo=docinfo, dom=dom) | docinfo = self.getNameFromIndexMeta(url, docinfo=docinfo, dom=dom) |
| #docinfo =self.getOrigPages(docinfo=docinfo) | |
| if presentationUrls and (len(presentationUrls) > 0): # ueberschreibe diese durch presentation informationen | if presentationUrls and (len(presentationUrls) > 0): # ueberschreibe diese durch presentation informationen |
| # presentation url ergiebt sich ersetzen von index.meta in der url der fuer die Metadaten | # presentation url ergiebt sich ersetzen von index.meta in der url der fuer die Metadaten |
| Line 748 class documentViewer(Folder): | Line 743 class documentViewer(Folder): |
| raise ValueError("Unknown mode %s! Has to be one of 'texttool','imagepath','filepath'."%(mode)) | raise ValueError("Unknown mode %s! Has to be one of 'texttool','imagepath','filepath'."%(mode)) |
| logging.debug("documentViewer (getdocinfo) docinfo: %s"%docinfo) | logging.debug("documentViewer (getdocinfo) docinfo: %s"%docinfo) |
| #logging.debug("documentViewer (getdocinfo) docinfo: %s"%) | |
| self.REQUEST.SESSION['docinfo'] = docinfo | self.REQUEST.SESSION['docinfo'] = docinfo |
| return docinfo | return docinfo |
| Line 755 class documentViewer(Folder): | Line 751 class documentViewer(Folder): |
| """returns pageinfo with the given parameters""" | """returns pageinfo with the given parameters""" |
| pageinfo = {} | pageinfo = {} |
| current = getInt(current) | current = getInt(current) |
| #pageinfo ['originalPage'] = originalPage | |
| pageinfo['current'] = current | pageinfo['current'] = current |
| rows = int(rows or self.thumbrows) | rows = int(rows or self.thumbrows) |
| pageinfo['rows'] = rows | pageinfo['rows'] = rows |
| Line 787 class documentViewer(Folder): | Line 785 class documentViewer(Folder): |
| toc = int (pageinfo['tocPN']) | toc = int (pageinfo['tocPN']) |
| pageinfo['textPages'] =int (toc) | pageinfo['textPages'] =int (toc) |
| if 'tocSize_%s'%tocMode in docinfo: | if 'tocSize_%s'%tocMode in docinfo: |
| tocSize = int(docinfo['tocSize_%s'%tocMode]) | tocSize = int(docinfo['tocSize_%s'%tocMode]) |
| tocPageSize = int(pageinfo['tocPageSize']) | tocPageSize = int(pageinfo['tocPageSize']) |