Changeset 541:c4cc01b104d7 in documentViewer for documentViewer.py
- Timestamp:
- Aug 20, 2012, 6:13:56 PM (12 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentViewer.py
r538 r541 18 18 import string 19 19 import json 20 21 from Products.MetaDataProvider import MetaDataFolder 20 22 21 23 from SrvTxtUtils import getInt, utf8ify, getText, getHttpData, refreshingImageFileIndexHtml … … 554 556 bib = self.metadataService.getBibData(dom=metaDom) 555 557 if bib: 556 docinfo = self.getDocinfoFromBib(docinfo, bib) 558 # save extended version as 'bibx' 559 bibx = self.metadataService.getBibData(dom=metaDom, all=True, recursive=1) 560 if len(bibx) == 1: 561 # unwrap list if possible 562 bibx = bibx[0] 563 564 docinfo['bibx'] = bibx 565 docinfo = self.getDocinfoFromBib(docinfo, bib, bibx) 557 566 else: 558 567 # no bib - try info.xml … … 668 677 docinfo['oddPage'] = texttool.get('odd-scan-position', 'left') 669 678 670 # number of title page ( 0: not defined)671 docinfo['titlePage'] = texttool.get('title-scan-no', 0)679 # number of title page (default 1) 680 docinfo['titlePage'] = texttool.get('title-scan-no', 1) 672 681 673 682 # old presentation stuff … … 681 690 return docinfo 682 691 683 def getDocinfoFromBib(self, docinfo, bib ):692 def getDocinfoFromBib(self, docinfo, bib, bibx=None): 684 693 """reads contents of bib element into docinfo""" 685 694 logging.debug("getDocinfoFromBib bib=%s"%repr(bib))
Note: See TracChangeset
for help on using the changeset viewer.