# HG changeset patch # User casties # Date 1439820878 -7200 # Node ID 618b600c805ae066067d73b6dd01c09051a61c8a # Parent 5d1534bd19b3f655995026732139af5e12cf9069 fix broken mode imagepath. diff -r 5d1534bd19b3 -r 618b600c805a documentViewer.py --- a/documentViewer.py Thu Jul 02 10:31:13 2015 +0200 +++ b/documentViewer.py Mon Aug 17 16:14:38 2015 +0200 @@ -551,6 +551,7 @@ docUrl = url.replace('/index.meta', '') if url.startswith('/mpiwg/online/'): docUrl = url.replace('/mpiwg/online/', '', 1) + elif mode=="textpath": #url points to an textfile #index.meta optional @@ -560,13 +561,11 @@ try: metaDom = self.metadataService.getDomFromPathOrUrl(docUrl) - removeINDEXMETA_NS(metaDom) - - except: metaDom = None + #metaDom = self.metadataService.getDomFromPathOrUrl(docUrl) #docinfo['imagePath'] = url.replace('/mpiwg/online', '', 1) docinfo['textURLPath'] = url.replace('/mpiwg/online', '', 1) @@ -586,9 +585,8 @@ elif mode=="imagepath": # url points to folder with images, index.meta optional # asssume index.meta in parent dir - + docUrl = getParentPath(url) metaDom = self.metadataService.getDomFromPathOrUrl(docUrl) - docinfo['imagePath'] = url.replace('/mpiwg/online', '', 1) elif mode=="hocr": @@ -624,7 +622,6 @@ # process index.meta contents if metaDom is not None and (metaDom.tag == 'resource' or metaDom.tag == "{%s}resource"%INDEXMETA_NS): - print("MD") # document directory name and path resource = self.metadataService.getResourceData(dom=metaDom, recursive=1) if resource: diff -r 5d1534bd19b3 -r 618b600c805a version.txt --- a/version.txt Thu Jul 02 10:31:13 2015 +0200 +++ b/version.txt Mon Aug 17 16:14:38 2015 +0200 @@ -1,1 +1,1 @@ -DocumentViewer 2.2.11 \ No newline at end of file +DocumentViewer 2.2.12 \ No newline at end of file