--- documentViewer/documentViewer.py 2011/07/29 18:36:04 1.175.2.12 +++ documentViewer/documentViewer.py 2011/08/02 16:29:15 1.175.2.15 @@ -464,6 +464,7 @@ class documentViewer(Folder): # process index.meta contents if metaDom is not None: # document directory name and path + logging.debug("RESOURCE: %s"%repr(self.metadataService.resource.meta.getData(dom=metaDom, all=True, recursive=2))) resource = self.metadataService.getResourceData(dom=metaDom) if resource: docinfo = self.getDocinfoFromResource(docinfo, resource) @@ -486,6 +487,20 @@ class documentViewer(Folder): if access: docinfo = self.getDocinfoFromAccess(docinfo, access) + # attribution info + attribution = self.metadataService.getAttributionData(dom=metaDom) + if attribution: + logging.debug("getDocinfo: attribution=%s"%repr(attribution)) + docinfo['attribution'] = attribution + #docinfo = self.getDocinfoFromAccess(docinfo, access) + + # copyright info + copyright = self.metadataService.getCopyrightData(dom=metaDom) + if copyright: + logging.debug("getDocinfo: copyright=%s"%repr(copyright)) + docinfo['copyright'] = copyright + #docinfo = self.getDocinfoFromAccess(docinfo, access) + # image path if mode != 'texttool': # override image path from texttool @@ -550,9 +565,15 @@ class documentViewer(Folder): textUrl = texttool.get('text-url-path', None) if textUrl: docinfo['textURLPath'] = textUrl - #TODO: ugly: - #textUrlkurz = string.split(textUrl, ".")[0] - #docinfo['textURLPathkurz'] = textUrlkurz + + # page flow + docinfo['pageFlow'] = texttool.get('page-flow', 'ltr') + + # odd pages are left + docinfo['oddPage'] = texttool.get('odd-scan-orientation', 'left') + + # number of title page + docinfo['titlePage'] = texttool.get('title-scan-no', 0) # old presentation stuff presentation = texttool.get('presentation', None) @@ -562,6 +583,7 @@ class documentViewer(Folder): else: docinfo['presentationUrl'] = os.path.join(docPath, presentation) + return docinfo def getDocinfoFromBib(self, docinfo, bib):