[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] navidoc/navidoc directives/pegboard.py modules/...
From: |
Asko Soukka |
Subject: |
[Gzz-commits] navidoc/navidoc directives/pegboard.py modules/... |
Date: |
Tue, 29 Apr 2003 04:28:39 -0400 |
CVSROOT: /cvsroot/navidoc
Module name: navidoc
Changes by: Asko Soukka <address@hidden> 03/04/29 04:28:39
Modified files:
navidoc/directives: pegboard.py
navidoc/modules: navbar.py
Log message:
navbar to replace also possible existing
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/navidoc/directives/pegboard.py.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/navidoc/navidoc/navidoc/modules/navbar.py.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
Patches:
Index: navidoc/navidoc/directives/pegboard.py
diff -u navidoc/navidoc/directives/pegboard.py:1.16
navidoc/navidoc/directives/pegboard.py:1.17
--- navidoc/navidoc/directives/pegboard.py:1.16 Thu Apr 24 03:48:04 2003
+++ navidoc/navidoc/directives/pegboard.py Tue Apr 29 04:28:39 2003
@@ -19,7 +19,7 @@
# MA 02111-1307 USA
#
-# $Id: pegboard.py,v 1.16 2003/04/24 07:48:04 humppake Exp $
+# $Id: pegboard.py,v 1.17 2003/04/29 08:28:39 humppake Exp $
#
# Written by Benja Fallensten, Vesa Kaihlavirta, Asko Soukka
@@ -303,7 +303,8 @@
para += literal
str = str[str.find('``')+2:len(str)]
__node = nodes.Text(str)
-
+
+ print "poks"
para += __node
return entry
Index: navidoc/navidoc/modules/navbar.py
diff -u navidoc/navidoc/modules/navbar.py:1.10
navidoc/navidoc/modules/navbar.py:1.11
--- navidoc/navidoc/modules/navbar.py:1.10 Mon Apr 28 08:54:19 2003
+++ navidoc/navidoc/modules/navbar.py Tue Apr 29 04:28:39 2003
@@ -19,7 +19,7 @@
# MA 02111-1307 USA
#
-#$Id: navbar.py,v 1.10 2003/04/28 12:54:19 tuukkah Exp $
+#$Id: navbar.py,v 1.11 2003/04/29 08:28:39 humppake Exp $
#
# Written by Benja Fallenstein
@@ -101,7 +101,7 @@
return s
def getBar(tree, filepath):
- bar = '<hr class="footer"/>'
+ bar = '<!-- NavBar begin -->\n<hr class="footer"/>\n'
bar += '<center class="navigation-title">Navigation</center>\n'
bar += '<div class="left-bar">\n'
bar += ('<p class="boxhead"><a href="%s">%s'
@@ -110,15 +110,20 @@
tree.name)
bar += '<p class="boxcontent"><ul>\n'
bar += simpleNavbar(tree, filepath=filepath)
- bar += '</ul></p></div>\n'
+ bar += '</ul></p></div>\n<!-- NavBar end -->\n'
return bar
def insertNavbars(tree, navbarTree=None, singleFile=None):
if navbarTree == None: navbarTree = tree
if singleFile:
file = open(el[0]); s = file.read(); file.close()
- i = s.find('<hr class="footer"/>')
- s = s[:i] + getBar(navbarTree, el[0]) + s[i:]
+
+ # Trys to find possible existing navbar first and replace that
+ i = s.find('<!-- NavBar begin -->'+"\n")
+ e = s.find('<!-- NavBar end -->'+"\n") + len('<!-- NavBar end
-->'+"\n")
+ if (i == -1): i = s.find('<hr class="footer"/>'); e = i
+
+ s = s[:i] + getBar(navbarTree, el[0]) + s[e:]
file = open(el[0], 'w')
file.write(s)
file.close()
@@ -128,8 +133,13 @@
for el in tree.files:
if len(el) == 2:
file = open(el[0]); s = file.read(); file.close()
- i = s.find('<hr class="footer"/>')
- s = s[:i] + getBar(navbarTree, el[0]) + s[i:]
+
+ # Tries to find possible existing navbar first and replace that
+ i = s.find('<!-- NavBar begin -->'+"\n")
+ e = s.find('<!-- NavBar end -->'+"\n") + len('<!-- NavBar end
-->'+"\n")
+ if (i == -1): i = s.find('<hr class="footer"/>'); e = i
+
+ s = s[:i] + getBar(navbarTree, el[0]) + s[e:]
file = open(el[0], 'w')
file.write(s)
file.close()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] navidoc/navidoc directives/pegboard.py modules/...,
Asko Soukka <=