Local files before sync with remote

This commit is contained in:
yangqianqian
2026-07-17 10:29:27 +08:00
commit 1dc354ef71
60 changed files with 4411 additions and 0 deletions

24
tools/kb-bot/send.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# send.sh —— 手动发一条 markdown 消息到飞书群P2-a 验证发消息通路)
#
# 用法:
# bash tools/kb-bot/send.sh <chat-id> "markdown 内容"
# # chat-id 用 lark-cli im +chat-search --query "群名" 查
#
# 加 --dry-run 只打印不发。
set -euo pipefail
export PATH="$HOME/.npm-global/bin:$PATH"
CHAT_ID="${1:-}"
CONTENT="${2:-}"
if [ -z "$CHAT_ID" ] || [ -z "$CONTENT" ]; then
echo "用法: bash tools/kb-bot/send.sh <chat-id> \"markdown 内容\"" >&2
echo "提示: 先用 lark-cli im +chat-search --query \"群名\" 查 chat-id" >&2
exit 1
fi
lark-cli im +messages-send \
--chat-id "$CHAT_ID" \
--markdown "$CONTENT" \
--as bot