gitlink-cli/doc/demo.sh

102 lines
3.4 KiB
Bash
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
# ============================================
# GitLink CLI 现场演示脚本
# 用法: bash demo.sh
# ============================================
set -e
cd "$(dirname "$0")/.."
export GITLINK_TOKEN="${GITLINK_TOKEN:-9185e0529683a6f8e7c9aa86bada03e8652740f7}"
export PATH="$(pwd):$PATH"
OWNER="z2_cc"
REPO="gitlink-cli"
cyan() { echo -e "\033[1;36m$1\033[0m"; }
green() { echo -e "\033[1;32m$1\033[0m"; }
yellow() { echo -e "\033[1;33m$1\033[0m"; }
dim() { echo -e "\033[2m$1\033[0m"; }
line() { echo -e "\033[2m─────────────────────────────────────────────────\033[0m"; }
pause() { echo ""; read -p "$(dim ' [按回车继续]')" _; echo ""; }
banner() {
echo ""
line
cyan " $1"
line
}
# ============================================
banner "① CLI 基础命令演示30 秒)"
# ============================================
dim " 演示repo +info / issue +list / collaborator +list / webhook +failed"
echo ""
yellow " $ gitlink-cli repo +info --owner $OWNER --repo $REPO --format table"
echo ""
gitlink-cli repo +info --owner "$OWNER" --repo "$REPO" --format table 2>&1 | head -15
pause
echo ""
yellow " $ gitlink-cli collaborator +list --owner $OWNER --repo $REPO"
echo ""
gitlink-cli collaborator +list --owner "$OWNER" --repo "$REPO" --format table 2>&1 | head -10
pause
echo ""
yellow " $ gitlink-cli issue +list --owner $OWNER --repo $REPO"
echo ""
gitlink-cli issue +list --owner "$OWNER" --repo "$REPO" --format table 2>&1 | head -12
pause
# ============================================
banner "② 社区运营自动化60 秒)"
# ============================================
dim " 演示:一条命令完成 Issue 分拣 → 周报 → Release Notes"
echo ""
yellow " $ DRY_RUN=true bash skills/gitlink-community-ops/scripts/community-ops-full.sh $OWNER $REPO"
echo ""
DRY_RUN=true bash skills/gitlink-community-ops/scripts/community-ops-full.sh "$OWNER" "$REPO" 2>&1 | tail -25
pause
echo ""
green " ✅ 生成的文件:"
find skills/gitlink-community-ops/scripts/_output -name "*.html" -o -name "*.md" | while read f; do
dim " 📄 $f"
done
pause
# ============================================
banner "③ 科研项目洞悉45 秒)"
# ============================================
dim " 演示8 维数据采集 + 4 维评分"
echo ""
yellow " $ bash skills/gitlink-research-insight/scripts/research-insight-full.sh $OWNER $REPO"
echo ""
bash skills/gitlink-research-insight/scripts/research-insight-full.sh "$OWNER" "$REPO" 2>&1 | tail -15
pause
# ============================================
banner "④ 知识图谱可视化45 秒)"
# ============================================
dim " 演示:多关键词搜索 → 实体关系图谱 → HTML 可视化"
echo ""
yellow " $ bash skills/gitlink-research-hotspot/scripts/hotspot-tracker-full.sh gitlink CLI"
echo ""
bash skills/gitlink-research-hotspot/scripts/hotspot-tracker-full.sh "gitlink" "CLI" 2>&1 | tail -15
pause
echo ""
green " ✅ 知识图谱已生成:"
dim " 🌐 skills/gitlink-research-hotspot/scripts/_output/knowledge-graph-gitlink.html"
echo ""
# ============================================
banner "演示完成 ✅"
# ============================================
echo ""
cyan " 所有数据均来自 GitLink API 实时采集"
cyan " 演示脚本doc/demo.sh"
echo ""