Changeset 448:35e7ea6f2368 in documentViewer for documentViewer.py


Ignore:
Timestamp:
Jul 29, 2011, 10:33:17 AM (13 years ago)
Author:
abukhman
Branch:
default
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentViewer.py

    r445 r448  
    596596    def getBibinfoFromIndexMeta(self,path,docinfo=None,dom=None,cut=0):
    597597        """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))
    599599       
    600600        if docinfo is None:
     
    608608        docinfo['indexMetaPath']=self.getIndexMetaPath(path);
    609609       
    610         logging.debug("documentViewer (getbibinfofromindexmeta cutted) path: %s"%(path))
     610        #logging.debug("documentViewer (getbibinfofromindexmeta cutted) path: %s"%(path))
    611611        # put in all raw bib fields as dict "bib"
    612612        bib = dom.xpath("//bib/*")
     
    628628        docinfo['bib_type'] = bibtype
    629629        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))
    632632        # if there is no mapping bibmap is empty (mapping sometimes has empty fields)
    633633        if len(bibmap) > 0 and len(bibmap['author'][0]) > 0:
     
    641641                docinfo['year']=getTextFromNode(dom.xpath("//bib/%s"%bibmap['year'][0])[0])
    642642            except: pass
    643             logging.debug("documentViewer (getbibinfofromindexmeta) using mapping for %s"%bibtype)
     643            #logging.debug("documentViewer (getbibinfofromindexmeta) using mapping for %s"%bibtype)
    644644            try:
    645645                docinfo['lang']=getTextFromNode(dom.xpath("//bib/lang")[0])
     
    686686            except:
    687687                docinfo['isbn_issn']=''           
     688        #logging.debug("I NEED BIBTEX %s"%docinfo)
    688689        return docinfo
    689690   
    690      
     691   
    691692    def getNameFromIndexMeta(self,path,docinfo=None,dom=None,cut=0):
    692693        """gets name info from the index.meta file at path or given by dom"""
     
    792793        presentationUrls = dom.xpath("//texttool/presentation")
    793794        docinfo = self.getBibinfoFromIndexMeta(url, docinfo=docinfo, dom=dom)   # get info von bib tag
     795        #docinfo = self.getDownloadfromDocinfoToBibtex(url, docinfo=docinfo, dom=dom)
    794796        docinfo = self.getNameFromIndexMeta(url, docinfo=docinfo, dom=dom)
    795797       
     
    847849        #path ist the path to the images it assumes that the index.meta file is one level higher.
    848850        docinfo = self.getBibinfoFromIndexMeta(pathorig,docinfo=docinfo,cut=cut+1)
     851        #docinfo = self.getDownloadfromDocinfoToBibtex(pathorig,docinfo=docinfo,cut=cut+1)
    849852        docinfo = self.getAuthinfoFromIndexMeta(pathorig,docinfo=docinfo,cut=cut+1)
    850853        return docinfo
     
    913916        pageinfo['textPN'] = self.REQUEST.get('textPN','1')
    914917        pageinfo['highlightQuery'] = self.REQUEST.get('highlightQuery','')
     918       
     919        pageinfo ['highlightElementPos'] = self.REQUEST.get('highlightElementPos','')
     920        pageinfo ['highlightElement'] = self.REQUEST.get('highlightElement','')
     921       
     922       
    915923        pageinfo['tocPageSize'] = self.REQUEST.get('tocPageSize', '30')
    916924        pageinfo['queryPageSize'] =self.REQUEST.get('queryPageSize', '10')
     
    929937            pageinfo['tocPN'] = min (tocPages,toc)                   
    930938        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','')
    932941        return pageinfo
    933942   
Note: See TracChangeset for help on using the changeset viewer.