Skip to content

Commit

Permalink
maintenance: add index to new doc pkg template
Browse files Browse the repository at this point in the history
  • Loading branch information
riegl-gc committed Aug 31, 2017
1 parent 0a4f03d commit 32e4706
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions maintenance/docs_create_missing_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@

# output directories
packages_dir = 'packages'
tmp_dir = 'packages/tmp'
only_hunter_dir = 'packages/only_hunter'

# create if not exist
for d in [packages_dir, tmp_dir, only_hunter_dir]:
for d in [packages_dir, only_hunter_dir]:
if not os.path.exists(d):
os.mkdir(d)

Expand All @@ -34,6 +33,8 @@
{}
.. index:: unsorted ; {}
.. _pkg.{}:
{}
Expand Down Expand Up @@ -63,16 +64,15 @@

# create dummy entries for packages only in hunter
for entry in pkg_only_hunter:
tmp_rst = os.path.join(tmp_dir, entry + '.rst')
target_rst = os.path.join(only_hunter_dir, entry + '.rst')

underscores = "=" * len(entry)
header = header_format_string.format(entry, entry, entry, underscores)
header = header_format_string.format(entry, entry, entry, entry, underscores)
#print(header)

with open(target_rst, 'w') as f:
f.write(header)
f.write(template_string)

print("pkg_match entries: ", len(pkg_match))
print("pkg_only_hunter entries: ", len(pkg_only_hunter))
print("pkg_only_hunter entries: ", len(pkg_only_hunter))

0 comments on commit 32e4706

Please sign in to comment.