INNER CODE UNIT · Python
title
netkiller/netkiller.github.io · generate_sitemaps.py:167
title = extract_title(OUTPUT_DIR / f)
file_display = str(f.relative_to(dir_name)) if dir_name else f.name
url_path = url_encode_path(f)
if title:
lines.append(f" - [{file_display}]({BASE_URL}/{url_path}): {title}")
else:
lines.append(f" - [{file_display}]({BASE_URL}/{url_path}): {f.stem}")
with open(OUTPUT_DIR / 'llms.txt', 'w', encoding='utf-8') as f:
f.write('\n'.join(lines))
print(f"Generated llms.txt with {len(html_files)} files in {len(dirs)} directories")
def main():
print("Scanning HTML files...")
html_files = get_html_files()
print(f"Found {len(html_files)} HTML files")