Files
skill-lib/docs/archive/领导演示资料/docs-scripts/查看架构图.sh
2026-03-06 03:36:12 +08:00

45 lines
1.6 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# sgClaw 团队协作架构图查看脚本
# 使用方法chmod +x 查看架构图.sh && ./查看架构图.sh
echo "============================================================"
echo "📊 sgClaw 团队协作架构图"
echo "============================================================"
echo ""
# 获取本机 IP
IP=$(hostname -I | awk '{print $1}')
if [ -z "$IP" ]; then
IP="localhost"
fi
PORT=8888
echo "正在启动 HTTP 服务器..."
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "📱 在浏览器中访问:"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo " 本机访问:"
echo " http://localhost:$PORT/团队协作架构图.html"
echo ""
echo " 局域网其他设备访问:"
echo " http://$IP:$PORT/团队协作架构图.html"
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "💡 提示:"
echo " • 按 Ctrl+C 停止服务器"
echo " • 可以直接打印为 PDF点击右下角「打印 PDF」按钮"
echo " • 或在浏览器中按 Ctrl+P 打印"
echo ""
echo "============================================================"
echo ""
# 启动 HTTP 服务器
cd "$(dirname "$0")"
python3 -m http.server $PORT --bind 0.0.0.0