MCPcopy Create free account
hub / github.com/OWASP/APTS / build_index

Function build_index

scripts/sync_index_from_readme.py:71–80  ·  view source on GitHub ↗

Compose index.md from the existing front matter and the README body.

(front_matter: str, readme_text: str)

Source from the content-addressed store, hash-verified

69
70
71def build_index(front_matter: str, readme_text: str) -> str:
72 """Compose index.md from the existing front matter and the README body."""
73
74 if not front_matter:
75 raise ValueError(
76 f"{display_path(INDEX)} is missing a Jekyll front matter block. "
77 "Restore the front matter manually before running the sync."
78 )
79
80 return f"{front_matter}\n{readme_text}"
81
82
83def main() -> int:

Callers 1

mainFunction · 0.85

Calls 1

display_pathFunction · 0.90

Tested by

no test coverage detected