49 types = [os.path.join(droot, t)
for t
in os.listdir(droot)
if os.path.isdir(os.path.join(droot, t))]
53 for t
in sorted(types):
54 _, type_ = os.path.split(t)
55 section = type_.replace(
" ",
"")
57 name = type_.replace(
"_",
" ")
58 docs.append(
"\subsection %s %s %s" % (section, name, title))
60 dirs = [os.path.join(t, f)
for f
in sorted(os.listdir(t))
if not f.startswith(
'.')]
63 relpath = os.path.relpath(d)
64 _, subname = os.path.split(d)
65 subsection = (type_+subname).replace(
" ",
"").replace(
".",
"")
67 docs.append(
"\subsubsection %s %s" % (subsection, subname))
73 docs.append(
"<dt>Description</dt><dd>%s</dd>" % (
get_readme(d)
or "<em>No description available</em>"))
75 docs.append(
"<dt>Geometry Files</dt><dd>%s</dt>" %
','.
join(geom_links))
77 docs.append(
"<dt>Shape Files</dt><dd>%s</dt>" %
', '.
join(shape_links))
80 docs.append(
"<dt>Images</dt><dd>%s</dd>" % (
'\n'.
join(images)
or "<em>No images available</em>"))
84 return "\n".
join(docs)
89 params[
"sources"] =
gen_geom_docs(os.path.join(geom,
"sources"),
"Sources")
90 params[
"eye_plaques"] = find_file_descriptions(os.path.join(geom,
"eye_plaques"),
"start geometry")
91 params[
"transforms"] = find_file_descriptions(os.path.join(geom,
"transformations"),
"start transformation")
92 params[
"phantoms"] = find_file_descriptions(os.path.join(geom,
"phantoms"),
"start geometry")
93 params[
"applicators"] = find_file_descriptions(os.path.join(geom,
"applicators"),
"start geometry")
95 docs =
"""@anchor egs_brachy_geom_lib
99The egs_brachy Geometry Library
100===============================
102\section egs_brachysources Source Library
105The current list of sources available in the egs_brachy geometry
110\section egs_brachyphantoms Phantom Library
112The current list of phantoms available in the egs_brachy geometry
118\section egs_brachyapplicators Applicator Library
120The current list of applicators available in the egs_brachy geometry
126\section egs_brachyplaques Eye Plaques Library
128The current list of eye plaques available in the egs_brachy geometry
133\section egs_brachytransforms Transformation Sets
135The current list of predefined transformation sets available in the
136egs_brachy geometry library.
142 open(fname,
"w").write(docs)