changeset 102:27513c893ba9

trying to fix text-only documents
author casties
date Mon, 10 May 2010 15:22:16 +0200
parents a839579233c3
children daedc22e4e76
files documentViewer.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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