Changeset 448:35e7ea6f2368 in documentViewer for documentViewer.py
- Timestamp:
- Jul 29, 2011, 10:33:17 AM (14 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentViewer.py
r445 r448 596 596 def getBibinfoFromIndexMeta(self,path,docinfo=None,dom=None,cut=0): 597 597 """gets bibliographical info from the index.meta file at path or given by dom""" 598 logging.debug("documentViewer (getbibinfofromindexmeta) path: %s"%(path))598 #logging.debug("documentViewer (getbibinfofromindexmeta) path: %s"%(path)) 599 599 600 600 if docinfo is None: … … 608 608 docinfo['indexMetaPath']=self.getIndexMetaPath(path); 609 609 610 logging.debug("documentViewer (getbibinfofromindexmeta cutted) path: %s"%(path))610 #logging.debug("documentViewer (getbibinfofromindexmeta cutted) path: %s"%(path)) 611 611 # put in all raw bib fields as dict "bib" 612 612 bib = dom.xpath("//bib/*") … … 628 628 docinfo['bib_type'] = bibtype 629 629 bibmap=metaData.generateMappingForType(bibtype) 630 logging.debug("documentViewer (getbibinfofromindexmeta) bibmap:"+repr(bibmap))631 logging.debug("documentViewer (getbibinfofromindexmeta) bibtype:"+repr(bibtype))630 #logging.debug("documentViewer (getbibinfofromindexmeta) bibmap:"+repr(bibmap)) 631 #logging.debug("documentViewer (getbibinfofromindexmeta) bibtype:"+repr(bibtype)) 632 632 # if there is no mapping bibmap is empty (mapping sometimes has empty fields) 633 633 if len(bibmap) > 0 and len(bibmap['author'][0]) > 0: … … 641 641 docinfo['year']=getTextFromNode(dom.xpath("//bib/%s"%bibmap['year'][0])[0]) 642 642 except: pass 643 logging.debug("documentViewer (getbibinfofromindexmeta) using mapping for %s"%bibtype)643 #logging.debug("documentViewer (getbibinfofromindexmeta) using mapping for %s"%bibtype) 644 644 try: 645 645 docinfo['lang']=getTextFromNode(dom.xpath("//bib/lang")[0]) … … 686 686 except: 687 687 docinfo['isbn_issn']='' 688 #logging.debug("I NEED BIBTEX %s"%docinfo) 688 689 return docinfo 689 690 690 691 691 692 def getNameFromIndexMeta(self,path,docinfo=None,dom=None,cut=0): 692 693 """gets name info from the index.meta file at path or given by dom""" … … 792 793 presentationUrls = dom.xpath("//texttool/presentation") 793 794 docinfo = self.getBibinfoFromIndexMeta(url, docinfo=docinfo, dom=dom) # get info von bib tag 795 #docinfo = self.getDownloadfromDocinfoToBibtex(url, docinfo=docinfo, dom=dom) 794 796 docinfo = self.getNameFromIndexMeta(url, docinfo=docinfo, dom=dom) 795 797 … … 847 849 #path ist the path to the images it assumes that the index.meta file is one level higher. 848 850 docinfo = self.getBibinfoFromIndexMeta(pathorig,docinfo=docinfo,cut=cut+1) 851 #docinfo = self.getDownloadfromDocinfoToBibtex(pathorig,docinfo=docinfo,cut=cut+1) 849 852 docinfo = self.getAuthinfoFromIndexMeta(pathorig,docinfo=docinfo,cut=cut+1) 850 853 return docinfo … … 913 916 pageinfo['textPN'] = self.REQUEST.get('textPN','1') 914 917 pageinfo['highlightQuery'] = self.REQUEST.get('highlightQuery','') 918 919 pageinfo ['highlightElementPos'] = self.REQUEST.get('highlightElementPos','') 920 pageinfo ['highlightElement'] = self.REQUEST.get('highlightElement','') 921 922 915 923 pageinfo['tocPageSize'] = self.REQUEST.get('tocPageSize', '30') 916 924 pageinfo['queryPageSize'] =self.REQUEST.get('queryPageSize', '10') … … 929 937 pageinfo['tocPN'] = min (tocPages,toc) 930 938 pageinfo['searchPN'] =self.REQUEST.get('searchPN','1') 931 pageinfo['sn'] =self.REQUEST.get('sn','') 939 #pageinfo['sn'] =self.REQUEST.get('sn','') 940 pageinfo['s'] =self.REQUEST.get('s','') 932 941 return pageinfo 933 942
Note: See TracChangeset
for help on using the changeset viewer.