MCPcopy Create free account
hub / github.com/blacklanternsecurity/bbot / update_toc

Function update_toc

bbot/scripts/docs.py:278–288  ·  view source on GitHub ↗
(section, level=0)

Source from the content-addressed store, hash-verified

276 bbot_docs_toc = ""
277
278 def update_toc(section, level=0):
279 nonlocal bbot_docs_toc
280 indent = " " * 4 * level
281 if isinstance(section, dict):
282 for section_title, subsections in section.items():
283 if isinstance(subsections, str):
284 bbot_docs_toc += f"{indent}{format_section(section_title, subsections)}"
285 else:
286 bbot_docs_toc += f"{indent}- **{section_title}**\n"
287 for subsection in subsections:
288 update_toc(subsection, level=level + 1)
289
290 mkdocs_yml_file = bbot_code_dir / "mkdocs.yml"
291 yaml.SafeLoader.add_constructor(

Callers 1

update_docsFunction · 0.85

Calls 1

format_sectionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…