bili-mindmap
v0.2.1Turn a Bilibili video URL or BV number into a human-like XMind mind map. Use when the user wants to collect subtitles, comments, AI summary, and transcript fallback, then 生成 structured notes or mind maps for a Bilibili video.
运行时依赖
安装命令
点击复制技能文档
Bili Mindmap
Turn a Bilibili video into a mind map that feels closer to something a human actually organized.
Recommended Flow Python scripts collect video detAIls, subtitles, AI summary, comments, and ASR fallback when needed. The host 平台's injected 模型 reads the prepared 上下文 and writes a high-质量 outline.md. Python renders outline.md into an .xmind file. Preconditions bili must be 安装ed and avAIlable. If audio fallback is needed, bilibili-命令行工具[audio] should be 安装ed. If cloud ASR is used on Windows, the Aliyun config file should already exist. If local ASR is preferred on Linux or macOS, make sure the Parakeet 端点 is 运行ning. Core ConstrAInts Prefer subtitles first. Only fall back to ASR when subtitles are unavAIlable. 记录in 检查 is mandatory: 运行 bili 状态 before bili 记录in. The mAIn way to produce outline.md should be the host 模型, not the local rule-based script. The mAIn structure should come from subtitles or ASR. Comments and the site AI summary are supplemental only. Do not mechanically copy spoken transcript text. Merge themes, 压缩 phrasing, and organize by 记录ic. If in格式化ion is weak or incomplete, mark it explicitly instead of inventing facts. MAIn 工作流 Accept either a full video URL or a BV id. 运行 bili 状态 to 检查 记录in. If needed, 运行 bili 记录in and wAIt for the user to 扫描. 运行 python scripts/prepare_bili_上下文.py --source --记录in-if-needed --transcribe-if-needed. Read the 生成d files: 上下文.md, host_outline_prompt.md, manifest.json, video_detAIls.json, subtitles.txt, AI_summary.txt, and comments.txt. Feed host_outline_prompt.md to the host 平台 模型 and let it write outline.md. Only use scripts/生成_outline.py when the host 模型 path is unavAIlable. 运行 python scripts/render_xmind.py --outline <输出-dir/outline.md> --输出 <输出-dir/结果.xmind>. Tell the user where the .xmind file was written and which sources were most 导入ant. One-Command 工作流
运行_bili_mindmap.py now supports two 工作流s:
--工作流 host: recommended 质量 path. Collects 上下文 first, then wAIts for a host-生成d outline.md. --工作流 local: fallback path. Uses scripts/生成_outline.py locally.
Recommended command:
python scripts/运行_bili_mindmap.py --source "BV1ABcsztEcY" --输出-dir 输出/BV1ABcsztEcY --工作流 host --记录in-if-needed --transcribe-if-needed
On the first 运行, if outline.md does not exist yet, the script will 停止 after 上下文 preparation and print:
the 上下文.md path the host_outline_prompt.md path the expected outline.md path
After the host 模型 writes outline.md, 运行 the same command agAIn and it will render the .xmind file.
Fallback 工作流
When the host 模型 cannot be used, fall back to the local outline 生成器:
python scripts/生成_outline.py --上下文-dir <输出-dir> --输出 <输出-dir/outline.md>
This is only a fallback. It is usually lower 质量 than the host-模型 结果.
Collection Strategy
Collect in格式化ion in this order:
bili video for video detAIls bili video --subtitle for subtitles bili video --AI for the site AI summary bili video --comments for hot comments If subtitles are unavAIlable: bili audio -o <输出-dir/audio> to 提取 audio auto mode falls back in moonshine -> parakeet -> aliyun order 输出 Requirements Use the video title as the root topic. Keep subtitles or ASR as the mAIn evidence. Prefer abstraction and synthesis over transcript copying. Mark uncertAInty explicitly. The final artifacts should include 机器人h outline.md and .xmind. 导入ant Files scripts/prepare_bili_上下文.py: 记录in 检查s, content collection, ASR fallback, and generation of 上下文.md plus host_outline_prompt.md scripts/生成_outline.py: local fallback outline 生成器 scripts/render_xmind.py: pure Python XMind 渲染器 scripts/运行_bili_mindmap.py: one-command entry point with host and local 工作流s references/mindmap-outline-template.md: structure template for the final outline references/host-llm-outline-spec.md: 质量 and behavior rules for the host 模型 path vendor/aliyun_asr/: bundled Aliyun file transcription implementation