changeset 452:8019b5360508

hack for annalen
author dwinter
date Wed, 04 Jan 2012 08:38:17 +0100
parents 91daab0c219b
children 73fb73577961
files documentViewer.py
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/documentViewer.py	Wed Sep 28 15:39:28 2011 +0200
+++ b/documentViewer.py	Wed Jan 04 08:38:17 2012 +0100
@@ -777,7 +777,20 @@
                 textUrl = textUrl.replace("/mpiwg/online", '', 1)
             
             docinfo['textURL'] = textUrl
-    
+        
+
+            #TODO: hack-DW for annalen
+            if (textUrl is not None) and (textUrl.startswith("/permanent/einstein/annalen")):
+                textUrl=textUrl.replace("/permanent/einstein/annalen/","/diverse/de/") 
+                splitted=textUrl.split("/fulltext")
+                textUrl=splitted[0]+".xml"
+                textUrlkurz = string.split(textUrl, ".")[0]
+                docinfo['textURLPathkurz'] = textUrlkurz
+                docinfo['textURLPath'] = textUrl
+                logging.debug("hack")
+                logging.debug(textUrl)
+            
+            
         # new style text-url-path
         textUrls = dom.xpath("//texttool/text-url-path")
         if textUrls and (len(textUrls) > 0):