Files

45 lines
1.4 KiB
Bash

#!/bin/bash
# Fetch and display Bot documentation sitemap organized by category
SITEMAP_URL="https://docs.hanzo.bot/sitemap.xml"
echo "๐Ÿ“š Bot Documentation Structure"
echo "===================================="
echo ""
# Fetch sitemap and extract URLs (macOS compatible)
URLS=$(curl -s "$SITEMAP_URL" | sed -n 's/.*<loc>\([^<]*\)<\/loc>.*/\1/p' | sort)
# Function to print category
print_category() {
local category="$1"
local emoji="$2"
local pattern="$3"
local matches=$(echo "$URLS" | grep -E "$pattern" | sed 's|https://docs.hanzo.bot/||')
if [ -n "$matches" ]; then
echo "$emoji $category"
echo "$matches" | sed 's/^/ - /'
echo ""
fi
}
# Print each category
print_category "Getting Started" "๐Ÿš€" "/start/"
print_category "Gateway & Operations" "๐Ÿ”ง" "/gateway/"
print_category "Providers" "๐Ÿ’ฌ" "/providers/"
print_category "Core Concepts" "๐Ÿง " "/concepts/"
print_category "Tools" "๐Ÿ› ๏ธ" "/tools/"
print_category "Automation" "โšก" "/automation/"
print_category "CLI" "๐Ÿ’ป" "/cli/"
print_category "Platforms" "๐Ÿ“ฑ" "/platforms/"
print_category "Nodes" "๐Ÿ“ก" "/nodes/"
print_category "Web" "๐ŸŒ" "/web/"
print_category "Install" "๐Ÿ“ฆ" "/install/"
print_category "Reference" "๐Ÿ“š" "/reference/"
print_category "Experiments" "๐Ÿงช" "/experiments/"
# Count total docs
TOTAL=$(echo "$URLS" | wc -l | tr -d ' ')
echo "๐Ÿ“Š Total documentation pages: $TOTAL"