#!/usr/bin/env python3
"""Script to update all category HTML pages with Font Awesome and navigation bar."""
import re
from pathlib import Path
# Define category pages and their active nav items
CATEGORIES = {
'pocs.html': 'POCs',
'system-prompts.html': 'System Prompts',
'frameworks.html': 'Frameworks',
'claude-code.html': 'Claude Code',
'mcp.html': 'MCP',
'gemini.html': 'Gemini',
'automation.html': 'Automation',
'context.html': 'Context',
'utilities.html': 'Utilities',
'documentation.html': 'Docs',
'miscellaneous.html': 'More'
}
# Subtitles for each category
SUBTITLES = {
'pocs.html': 'Proof of concepts for AI systems and workflows',
'system-prompts.html': 'System prompts for configuring AI assistants and agents',
'frameworks.html': 'Frameworks, tools, and utilities for AI development',
'claude-code.html': 'Projects built with and for Claude Code CLI',
'mcp.html': 'Model Context Protocol servers and implementations',
'gemini.html': 'Projects leveraging Google\'s Gemini AI',
'automation.html': 'N8N workflows and automation tools',
'context.html': 'Context repositories and prompt collections',
'utilities.html': 'Standalone tools and utility applications',
'documentation.html': 'Documentation projects and resource indexes',
'miscellaneous.html': 'Various AI experiments and unique projects'
}
NAV_BAR = ''' '''
def update_page(file_path: Path, active_nav: str, subtitle: str):
"""Update a single category page."""
content = file_path.read_text()
# Add Font Awesome if not present
if 'font-awesome' not in content:
content = content.replace(
'',
'\n '
)
# Update header structure
header_pattern = r'.*?'
new_header = f'''