/[gzz]/gzz/metacode/umldoc.py
ViewVC logotype

Diff of /gzz/metacode/umldoc.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by humppake, Thu Dec 19 10:25:49 2002 UTC revision 1.9 by tjl, Tue Dec 31 10:08:01 2002 UTC
# Line 55  import docutils.core Line 55  import docutils.core
55    
56  umltool.settings['css'] = 'doc/gzz.css'  umltool.settings['css'] = 'doc/gzz.css'
57    
58    def _slashify(path):
59        """Add a trailing slash if not already there.
60        """
61        return (path+"/").replace("//","/")
62    
63    def _rstFiles(path):
64        files = [f for f in os.listdir(path+'/') \
65               if os.path.isfile(path+'/'+f) and not f.startswith('.')
66                  and '#' not in f and '~' not in f]
67        rstfiles = [f for f in files if f.endswith('.rst')]
68        return rstfiles
69    
70  def run_convert(path):  def run_convert(path):
71      umltool.set_to_root(path)      umltool.set_to_root(path)
72            
73      if os.path.isdir(path):      if os.path.isdir(path):
74          umltool.set_to_root((path+"/").replace("//", "/"))          umltool.set_to_root(_slashify(path))
75          files = [f for f in os.listdir(path+'/') \          rstfiles = _rstFiles(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')]  
   
76          for rstfile in rstfiles:          for rstfile in rstfiles:
77              rst2html(path+"/"+rstfile)              rst2html(path+"/"+rstfile)
78    
# Line 78  def run_embed(path): Line 86  def run_embed(path):
86      umltool.set_to_root(path)      umltool.set_to_root(path)
87            
88      if os.path.isdir(path):      if os.path.isdir(path):
89          umltool.set_to_root((path+"/").replace("//", "/"))          umltool.set_to_root(_slashify(path))
90          files = [f for f in os.listdir(path+'/') \          rstfiles = _rstFiles(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')]  
91    
92          for rstfile in rstfiles:          for rstfile in rstfiles:
93              umlrst.embed_diagram(path+"/"+rstfile)              umlrst.embed_diagram(path+"/"+rstfile)

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26