# HG changeset patch # User casties # Date 1273497736 -7200 # Node ID 27513c893ba9a2582fa4f3b31356058ae857babe # Parent a839579233c3494086173d7b8289cca60341f71e trying to fix text-only documents diff -r a839579233c3 -r 27513c893ba9 documentViewer.py --- a/documentViewer.py Fri May 07 16:11:49 2010 +0200 +++ b/documentViewer.py Mon May 10 15:22:16 2010 +0200 @@ -546,7 +546,10 @@ textUrls = dom.xpath("//texttool/text-url-path") if textUrls and (len(textUrls) > 0): textUrl = getTextFromNode(textUrls[0]) - docinfo['textURLPath'] = textUrl + docinfo['textURLPath'] = textUrl + if not docinfo['imagePath']: + # text-only, no page images + docinfo = self.getNumPages(docinfo) #im moment einfach auf eins setzen, navigation ueber die thumbs geht natuerlich nicht presentationUrls = dom.xpath("//texttool/presentation") docinfo = self.getBibinfoFromIndexMeta(url, docinfo=docinfo, dom=dom) # get info von bib tag @@ -559,7 +562,7 @@ presentationUrl = url.replace('index.meta', presentationPath) else: presentationUrl = url + "/" + presentationPath - docinfo = self.getNumPages(docinfo) #im moment einfach auf eins setzen, navigation ueber die thumbs geht natuerlich nicht + docinfo = self.getBibinfoFromTextToolPresentation(presentationUrl, docinfo=docinfo, dom=dom) docinfo = self.getAuthinfoFromIndexMeta(url, docinfo=docinfo, dom=dom) # get access info