Adapting tree-cutter.py to deal with language codes in the filenames.
[treecutter.git] / src / tree-cutter.py
index db93a6d0d0ef978392573e577bf5b5e8e6f1b037..c15e2c3ca7c960ae2337d94ea7e9cb89ac3047bb 100755 (executable)
@@ -56,8 +56,8 @@ def generateSitemap():
 
         if title and menu:
           found = 0
-          base = os.path.splitext(xfile)[0]
-          link = base.translate(None,'.').replace('index','')
+          base = xfile.split('.')[1]
+          link = base.replace('index','')
           level = len(filter(None,re.split(r'(/\w*/)',link)))
           page = dict(title=unicode(doc.article.info.title),
                       menu=unicode(doc.article.info.titleabbrev),