52 |
import docutils.core |
import docutils.core |
53 |
|
|
54 |
# must be run in the main directory of gzz module |
# must be run in the main directory of gzz module |
55 |
|
settings = mputils.Settings() |
56 |
umltool.settings['css'] = 'doc/gzz.css' |
settings['css'] = 'doc/gzz.css' |
57 |
|
|
58 |
mputils.__rst_init__() |
mputils.__rst_init__() |
59 |
umlrst.__rst_init__() |
umlrst.__rst_init__() |
92 |
|
|
93 |
def rst2html(path): |
def rst2html(path): |
94 |
umltool.set_transition_paths(path) |
umltool.set_transition_paths(path) |
95 |
umltool.settings['context'] = path |
settings['context'] = path |
96 |
#the first pass - converts rst into html |
#the first pass - converts rst into html |
97 |
if path.endswith(".rst"): path = path[0:len(path)-4] |
if path.endswith(".rst"): path = path[0:len(path)-4] |
98 |
args = '-stg --stylesheet '+umltool.settings['to_css']\ |
args = '-stg --stylesheet '+settings['to_css']\ |
99 |
+' '+path+'.rst '+path+'.gen.html' |
+' '+path+'.rst '+path+'.gen.html' |
100 |
docutils.core.publish_cmdline(writer_name='html', argv=args.split()) |
docutils.core.publish_cmdline(writer_name='html', argv=args.split()) |
101 |
|
|