Changeset 434:44ccb7bd0938 in documentViewer
- Timestamp:
- Feb 24, 2011, 1:55:28 PM (14 years ago)
- Branch:
- default
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
MpdlXmlTextServer.py
r432 r434 184 184 name = docinfo.get('name',None) 185 185 pn =pageinfo['current'] 186 #viewMode= pageinfo['viewMode']187 188 186 sn = pageinfo['sn'] 189 187 highlightQuery = pageinfo['highlightQuery'] … … 210 208 if len(pagedivs)>0: 211 209 docinfo['pageNumberOrig']= getTextFromNode(pagedivs[0]) 212 logging.debug("ORIGINAL PAGES: %s"%(docinfo['pageNumberOrig']))210 #logging.debug("ORIGINAL PAGES: %s"%(docinfo['pageNumberOrig'])) 213 211 214 212 #original Pages Norm … … 217 215 if len(pagedivs)>0: 218 216 docinfo['pageNumberOrigNorm']= getTextFromNode(pagedivs[0]) 219 logging.debug("ORIGINAL PAGES: %s"%(docinfo['pageNumberOrigNorm']))217 #logging.debug("ORIGINAL PAGES: %s"%(docinfo['pageNumberOrigNorm'])) 220 218 221 219 … … 229 227 try: 230 228 docinfo['countFigureEntries'] = int(s) 231 logging.debug("FIGURE ENTRIES: %s"%(s))229 #logging.debug("FIGURE ENTRIES: %s"%(s)) 232 230 except: 233 231 docinfo['countFigureEntries'] = 0 … … 236 234 try: 237 235 docinfo['countFigureEntries'] = int(s1) 238 logging.debug("FIGURE ENTRIES: %s"%(s1))236 #logging.debug("FIGURE ENTRIES: %s"%(s1)) 239 237 except: 240 238 docinfo['countFigureEntries'] = 0 … … 248 246 try: 249 247 docinfo['countPlaces'] = int(s) 250 logging.debug("PLACES HERE: %s"%(s))248 #logging.debug("PLACES HERE: %s"%(s)) 251 249 except: 252 250 docinfo['countPlaces'] = 0 … … 261 259 try: 262 260 docinfo['countTocEntries'] = int(s) 263 logging.debug("TEXT ENTRIES: %s"%(s))261 #logging.debug("TEXT ENTRIES: %s"%(s)) 264 262 except: 265 263 docinfo['countTocEntries'] = 0 … … 268 266 try: 269 267 docinfo['countTocEntries'] = int(s1) 270 logging.debug("TEXT ENTRIES: %s"%(s1))268 #logging.debug("TEXT ENTRIES: %s"%(s1)) 271 269 except: 272 270 docinfo['countTocEntries'] = 0 … … 281 279 try: 282 280 docinfo['numPages'] = int(s) 283 logging.debug("PAGE NUMBER: %s"%(s))281 #logging.debug("PAGE NUMBER: %s"%(s)) 284 282 285 283 np = docinfo['numPages'] … … 409 407 numdivs = pagedom.xpath("//div[@class='queryResultHits']") 410 408 tocSearch = int(getTextFromNode(numdivs[0])) 411 logging.debug("documentViewer (gettoc) tocSearch: %s"%(tocSearch))409 #logging.debug("documentViewer (gettoc) tocSearch: %s"%(tocSearch)) 412 410 tc=int((tocSearch/10)+1) 413 logging.debug("documentViewer (gettoc) tc: %s"%(tc))411 #logging.debug("documentViewer (gettoc) tc: %s"%(tc)) 414 412 return tc 415 413 416 414 def getToc(self, mode="text", docinfo=None): 417 415 """loads table of contents and stores in docinfo""" 418 logging.debug("documentViewer (gettoc) mode: %s"%(mode))416 #logging.debug("documentViewer (gettoc) mode: %s"%(mode)) 419 417 if mode == "none": 420 418 return docinfo … … 469 467 text = page.replace('mode=image','mode=texttool') 470 468 #logging.debug("documentViewer (characterNormalization) characterNormalization: %s"%(characterNormalization)) 471 logging.debug("TEXT %s"%(text))469 #logging.debug("TEXT %s"%(text)) 472 470 return text 473 471 -
documentViewer.py
r432 r434 767 767 textUrl = getTextFromNode(textUrls[0]) 768 768 docinfo['textURLPath'] = textUrl 769 textUrlkurz = string.split(textUrl, ".")[0] 770 docinfo['textURLPathkurz'] = textUrlkurz 769 771 #if not docinfo['imagePath']: 770 772 # text-only, no page images
Note: See TracChangeset
for help on using the changeset viewer.