39 types = [os.path.join(droot, t)
for t
in os.listdir(droot)
if os.path.isdir(os.path.join(droot, t))]
43 for t
in sorted(types):
44 _, type_ = os.path.split(t)
45 section = type_.replace(
" ",
"")
47 name = type_.replace(
"_",
" ")
48 docs.append(
"\subsection %s %s %s" % (section, name, title))
50 dirs = [os.path.join(t, f)
for f
in sorted(os.listdir(t))
if not f.startswith(
'.')]
53 relpath = os.path.relpath(d)
54 _, subname = os.path.split(d)
55 subsection = (type_+subname).replace(
" ",
"").replace(
".",
"")
57 docs.append(
"\subsubsection %s %s" % (subsection, subname))
63 docs.append(
"<dt>Description</dt><dd>%s</dd>" % (
get_readme(d)
or "<em>No description available</em>"))
65 docs.append(
"<dt>Geometry Files</dt><dd>%s</dt>" %
','.
join(geom_links))
67 docs.append(
"<dt>Shape Files</dt><dd>%s</dt>" %
', '.
join(shape_links))
70 docs.append(
"<dt>Images</dt><dd>%s</dd>" % (
'\n'.
join(images)
or "<em>No images available</em>"))
74 return "\n".
join(docs)
79 params[
"sources"] =
gen_geom_docs(os.path.join(geom,
"sources"),
"Sources")
80 params[
"eye_plaques"] = find_file_descriptions(os.path.join(geom,
"eye_plaques"),
"start geometry")
81 params[
"transforms"] = find_file_descriptions(os.path.join(geom,
"transformations"),
"start transformation")
82 params[
"phantoms"] = find_file_descriptions(os.path.join(geom,
"phantoms"),
"start geometry")
83 params[
"applicators"] = find_file_descriptions(os.path.join(geom,
"applicators"),
"start geometry")
85 docs =
"""@anchor egs_brachy_geom_lib
89The egs_brachy Geometry Library
90===============================
92\section egs_brachysources Source Library
95The current list of sources available in the egs_brachy geometry
100\section egs_brachyphantoms Phantom Library
102The current list of phantoms available in the egs_brachy geometry
108\section egs_brachyapplicators Applicator Library
110The current list of applicators available in the egs_brachy geometry
116\section egs_brachyplaques Eye Plaques Library
118The current list of eye plaques available in the egs_brachy geometry
123\section egs_brachytransforms Transformation Sets
125The current list of predefined transformation sets available in the
126egs_brachy geometry library.
132 open(fname,
"w").write(docs)