|
|
| version 1.27, 2007/06/08 18:10:22 | version 1.28, 2007/06/14 16:07:21 |
|---|---|
| Line 18 import sys | Line 18 import sys |
| import cgi | import cgi |
| import urllib | import urllib |
| import logging | import logging |
| import math | |
| import urlparse | import urlparse |
| Line 440 class documentViewer(Folder): | Line 441 class documentViewer(Folder): |
| dom=self.getPresentationInfoXML(url) | dom=self.getPresentationInfoXML(url) |
| docinfo['author']=getTextFromNode(dom.xpath("//author")[0]) | docinfo['author']=getTextFromNode(dom.xpath("//author")[0]) |
| docinfo['title']=getTextFromNode(dom.xpath("//title")[0]) | docinfo['title']=getTextFromNode(dom.xpath("//title")[0]) |
| docinfo['year']=getTextFromNode(dom.xpath("//date")[0]) | #docinfo['year']=getTextFromNode(dom.xpath("//date")[0]) |
| return docinfo | return docinfo |
| def getDocinfoFromImagePath(self,path,docinfo=None): | def getDocinfoFromImagePath(self,path,docinfo=None): |
| Line 495 class documentViewer(Folder): | Line 496 class documentViewer(Folder): |
| pageinfo['cols'] = cols | pageinfo['cols'] = cols |
| grpsize = cols * rows | grpsize = cols * rows |
| pageinfo['groupsize'] = grpsize | pageinfo['groupsize'] = grpsize |
| start = getInt(start, default=(int(current / grpsize) * grpsize +1)) | start = getInt(start, default=(math.ceil(float(current)/float(grpsize))*grpsize-(grpsize-1))) |
| # int(current / grpsize) * grpsize +1)) | |
| pageinfo['start'] = start | pageinfo['start'] = start |
| pageinfo['end'] = start + grpsize | pageinfo['end'] = start + grpsize |
| if docinfo is not None: | if docinfo is not None: |