gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/metacode umldoc.py


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz/metacode umldoc.py
Date: Tue, 31 Dec 2002 05:08:02 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/12/31 05:08:02

Modified files:
        metacode       : umldoc.py 

Log message:
        Clean up a bit

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/metacode/umldoc.py.diff?tr1=1.8&tr2=1.9&r1=text&r2=text

Patches:
Index: gzz/metacode/umldoc.py
diff -u gzz/metacode/umldoc.py:1.8 gzz/metacode/umldoc.py:1.9
--- gzz/metacode/umldoc.py:1.8  Thu Dec 19 05:25:49 2002
+++ gzz/metacode/umldoc.py      Tue Dec 31 05:08:01 2002
@@ -55,16 +55,24 @@
 
 umltool.settings['css'] = 'doc/gzz.css'
 
+def _slashify(path):
+    """Add a trailing slash if not already there.
+    """
+    return (path+"/").replace("//","/")
+
+def _rstFiles(path):
+    files = [f for f in os.listdir(path+'/') \
+          if os.path.isfile(path+'/'+f) and not f.startswith('.')
+             and '#' not in f and '~' not in f]
+    rstfiles = [f for f in files if f.endswith('.rst')]
+    return rstfiles
+
 def run_convert(path):
     umltool.set_to_root(path)
     
     if os.path.isdir(path):
-        umltool.set_to_root((path+"/").replace("//", "/"))
-        files = [f for f in os.listdir(path+'/') \
-               if os.path.isfile(path+'/'+f) and not f.startswith('.')
-                  and '#' not in f and '~' not in f]
-        rstfiles = [f for f in files if f.endswith('.rst')]
-
+        umltool.set_to_root(_slashify(path))
+       rstfiles = _rstFiles(path)
         for rstfile in rstfiles:
             rst2html(path+"/"+rstfile)
 
@@ -78,11 +86,8 @@
     umltool.set_to_root(path)
     
     if os.path.isdir(path):
-        umltool.set_to_root((path+"/").replace("//", "/"))
-        files = [f for f in os.listdir(path+'/') \
-               if os.path.isfile(path+'/'+f) and not f.startswith('.')
-                  and '#' not in f and '~' not in f]
-        rstfiles = [f for f in files if f.endswith('.rst')]
+        umltool.set_to_root(_slashify(path))
+       rstfiles = _rstFiles(path)
 
         for rstfile in rstfiles:
             umlrst.embed_diagram(path+"/"+rstfile)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]