Skip to content

Commit

Permalink
added framework for updating table of contents using .py file
Browse files Browse the repository at this point in the history
  • Loading branch information
tsole0 committed Jun 29, 2023
1 parent e879fd5 commit 061f1ae
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/sphinx-docs/doc-regen/makedocumentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ def get_main_docs():
TARGETS = get_py(ABSOLUTE_TARGET_MAIN) + get_py(ABSOLUTE_TARGET_USER)
return TARGETS

def call_regenmodel(filepath):
def call_regenmodel(filepath, regen_py):
"""
Runs regenmodel.py with all found PY_FILES
Runs regenmodel.py/regentoc.py with all found PY_FILES
"""
REGENMODEL = abspath("regenmodel.py")
REGENMODEL = abspath(regen_py)
command = [
sys.executable,
REGENMODEL,
Expand All @@ -42,7 +42,8 @@ def main():
TARGETS = get_main_docs()
print(TARGETS)
for file in TARGETS:
call_regenmodel(file)
call_regenmodel(file, "regenmodel.py")
call_regenmodel(file, "regentoc.py")

if __name__ == "__main__":
main()

0 comments on commit 061f1ae

Please sign in to comment.