Changeset 618:54d3498a6e78 in documentViewer
- Timestamp:
- Jul 23, 2014, 3:51:15 PM (11 years ago)
- Branch:
- default
- Parents:
- 617:7aefbddddaf9 (diff), 615:d6eca930a534 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentViewer.py
r615 r618 22 22 def getMDText(node): 23 23 """returns the @text content from the MetaDataProvider metadata node""" 24 25 26 24 27 if isinstance(node, dict): 25 28 return node.get('@text', None) 26 29 30 if isinstance(node,list): #more than one text file if there is an attribute don't choose it 31 for nodeInList in node: 32 attr = nodeInList.get("@attr",None) 33 if attr is None: 34 return node.get('@text',None) 35 return None 36 37 38 27 39 return node 28 40 … … 256 268 logging.error("template folder missing!") 257 269 return "ERROR: template folder missing!" 258 270 271 272 259 273 if not getattr(self, 'digilibBaseUrl', None): 260 274 self.digilibBaseUrl = self.findDigilibUrl() or "http://digilib.mpiwg-berlin.mpg.de/digitallibrary" … … 751 765 # old style text URL 752 766 textUrl = getMDText(texttool.get('text', None)) 767 768 769 770 753 771 if textUrl and docPath: 754 772 if urlparse.urlparse(textUrl)[0] == "": #keine url
Note: See TracChangeset
for help on using the changeset viewer.