comparison documentViewer.py @ 457:9fb231ad0bd2 elementtree

made to work (barely) with Dirks ISMI-Version
author casties
date Tue, 19 Jul 2011 11:54:06 +0200
parents 0a53fea83df7
children 48b135b089c8
comparison
equal deleted inserted replaced
456:b27a7d2f06ff 457:9fb231ad0bd2
654 docinfo['bib_type'] = bibtype 654 docinfo['bib_type'] = bibtype
655 bibmap=metaData.generateMappingForType(bibtype) 655 bibmap=metaData.generateMappingForType(bibtype)
656 logging.debug("documentViewer (getbibinfofromindexmeta) bibmap:"+repr(bibmap)) 656 logging.debug("documentViewer (getbibinfofromindexmeta) bibmap:"+repr(bibmap))
657 logging.debug("documentViewer (getbibinfofromindexmeta) bibtype:"+repr(bibtype)) 657 logging.debug("documentViewer (getbibinfofromindexmeta) bibtype:"+repr(bibtype))
658 # if there is no mapping bibmap is empty (mapping sometimes has empty fields) 658 # if there is no mapping bibmap is empty (mapping sometimes has empty fields)
659 if len(bibmap) > 0 and len(bibmap['author'][0]) > 0 or len(bibmap['title'][0]) > 0: 659 logging.debug("bibmap: %s"%repr(bibmap))
660 if len(bibmap) > 0 and bibmap.get('author',None) or bibmap.get('title',None):
660 try: 661 try:
661 docinfo['author']=getText(bib.find(bibmap['author'][0])) 662 docinfo['author']=getText(bib.find(bibmap['author'][0]))
662 except: pass 663 except: pass
663 try: 664 try:
664 docinfo['title']=getText(bib.find(bibmap['title'][0])) 665 docinfo['title']=getText(bib.find(bibmap['title'][0]))