15 |
# file for more details. |
# file for more details. |
16 |
|
|
17 |
import os, os.path |
import os, os.path |
18 |
import umlrst |
import umlrst, mputils |
19 |
|
|
20 |
#relative or absolute location of pegboard directory |
#relative or absolute location of pegboard directory |
21 |
pegroot = 'doc/pegboard' |
pegroot = 'doc/pegboard' |
22 |
|
|
23 |
pegdirs = [d for d in os.listdir(pegroot+'/') |
mputils.__rst_init__() |
24 |
if os.path.isdir(pegroot+'/'+d) and d != 'CVS'] |
umlrst.__rst_init__() |
25 |
|
|
26 |
for pegdir in pegdirs: |
pegdirs = [d for d in os.listdir(mputils._slashify(pegroot)) |
27 |
pegfiles = [f for f in os.listdir(pegroot+'/'+pegdir+'/') \ |
if os.path.isdir(mputils._slashify(pegroot)+d) and d != 'CVS'] |
|
if os.path.isfile(pegroot+'/'+pegdir+'/'+f) and not f.startswith('.') |
|
|
and '#' not in f and '~' not in f] |
|
28 |
|
|
29 |
|
for pegdir in pegdirs: |
30 |
|
pegfiles = [f for f in os.listdir(mputils._slashify(pegroot)\ |
31 |
|
+mputils._slashify(pegdir))\ |
32 |
|
if os.path.isfile(mputils._slashify(pegroot)\ |
33 |
|
+mputils._slashify(pegdir)+f)\ |
34 |
|
and not f.startswith('.') |
35 |
|
and '#' not in f and '~' not in f] |
36 |
|
|
37 |
rstfiles = [f for f in pegfiles if f.endswith('.rst')] |
rstfiles = [f for f in pegfiles if f.endswith('.rst')] |
38 |
|
|
39 |
######################### |
######################### |
40 |
#UMLDOC: the second pass# |
#UMLDOC: the second pass# |
41 |
######################### |
######################### |
42 |
for rstfile in rstfiles: |
for rstfile in rstfiles: |
43 |
file = pegroot+'/'+pegdir+'/'+rstfile |
file = mputils._slashify(pegroot)\ |
44 |
umlrst.embed_diagram(file) |
+mputils._slashify(pegdir)\ |
45 |
|
+rstfile |
46 |
|
umlrst.embed_diagrams(file) |