feat: 钉钉群聊飞书文档收集与知识图谱系统初始提交

- 通过悟空(dws CLI)拉取dc战略问题研究院+创新组两个群的消息(377条)
- 提取190个飞书链接、18个文件附件
- 下载HTML/MD/XLSX等报告文件到output/downloaded-files/
- 构建知识图谱(JSON+HTML可视化)
- 生成Obsidian知识库(28个页面,7大主题)
- 生成花园世界全量汇总报告
- 所有脚本路径改为相对路径,便于迁移
This commit is contained in:
Evilom
2026-06-02 20:24:25 +08:00
commit fe5505343e
77 changed files with 20155 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
import sys, io, json, re
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
import os
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PROJECT_ROOT = os.path.dirname(SCRIPT_DIR)
with open(os.path.join(PROJECT_ROOT, "data", "raw-messages", "all_messages_combined.json"), "r", encoding="utf-8") as f:
data = json.load(f)
# Find all messages mentioning 花园世界 or garden
garden_msgs = []
for group_name, msgs in data.items():
for msg in msgs:
content = msg.get("content", "")
if "花园" in content or "garden" in content.lower() or "GOS" in content or "gos" in content.lower() or "花灵" in content or "花材" in content or "花种" in content or "种花" in content or "麟贝" in content:
garden_msgs.append({
"sender": msg.get("sender",""),
"time": msg.get("createTime",""),
"group": "dc" if group_name == "dc" else "cx",
"content": content[:300]
})
print("=== 花园世界相关消息: %d 条 ===" % len(garden_msgs))
for m in sorted(garden_msgs, key=lambda x: x["time"]):
print("[%s] %s (%s): %s" % (m["time"][:10], m["sender"], m["group"], m["content"][:150]))
print()