mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 15:18:20 +00:00
Update the generated script doc organization.
Added an additional master TOC index for Bro script packages that automatically gets filled in at ``make doc`` time. The master TOC links to per-package indexes which contains links to all the scripts contained within it along with their summary. The per-package index is also now automatically generated/derived from the path component of the script passed into the rest_target() macro.
This commit is contained in:
parent
fe5f4b8e53
commit
5a2cd265ab
22 changed files with 229 additions and 236 deletions
|
@ -46,6 +46,16 @@ with open(group_list, 'r') as f_group_list:
|
|||
summary_comments.append(line[(sum_pos+3):])
|
||||
#print summary_comments
|
||||
group_file = os.path.join(output_dir, group + ".rst")
|
||||
if not os.path.exists(group_file):
|
||||
if not os.path.exists(os.path.dirname(group_file)):
|
||||
os.makedirs(os.path.dirname(group_file))
|
||||
with open(group_file, 'w') as f_group_file:
|
||||
title = "Package Index: %s\n" % os.path.dirname(group)
|
||||
f_group_file.write(title);
|
||||
for n in range(len(title)):
|
||||
f_group_file.write("=")
|
||||
f_group_file.write("\n");
|
||||
|
||||
with open(group_file, 'a') as f_group_file:
|
||||
f_group_file.write("\n:doc:`/policy/%s`\n" % doc_names[i])
|
||||
for line in summary_comments:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue