MCPcopy Create free account
hub / github.com/bytecodealliance/component-docs / parse_summary

Function parse_summary

scripts/generate_sitemap.py:8–17  ·  view source on GitHub ↗

Parse URLs from the SUMMARY.md file.

(summary_file_path)

Source from the content-addressed store, hash-verified

6import argparse
7
8def parse_summary(summary_file_path):
9 """Parse URLs from the SUMMARY.md file."""
10 with open(summary_file_path, "r") as file:
11 for line in file:
12 if "](" in line:
13 url = line.split("](")[1].split(")")[0]
14 # Add .html extension if not the root URL
15 if url.endswith(".md"):
16 url = url[:-3] + ".html"
17 yield url
18
19def determine_priority(url_path, higher_priority_section):
20 """Determine the priority based on the URL path and specified higher priority section."""

Callers 1

generate_sitemapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…