Use when the user provides a Bilibili URL (BV number) and wants LaTeX course notes rendered as PDF. Triggers: Bilibili link, BV号, 'B站视频笔记', '整理B站课'. Falls back to Whisper when no CC subtitles.
Turn a Bilibili video into a complete, compileable .tex note and a rendered PDF.
This skill extends the youtube-render-pdf workflow with Bilibili-specific adaptations.
Read ../video-render-common/writing-and-figures.md for all writing rules, teaching content rules, figure handling, figure time provenance, and visualization guidelines. These rules are mandatory.
| Aspect | Handling |
|---|---|
| Subtitle scarcity | CC subtitles → Whisper speech-to-text → visual-only mode |
| Login-gated HD | 1080P+ requires cookies; use yt-dlp --cookies-from-browser chrome |
| Multi-part videos | Detect 分P videos, ask user which parts to process |
| URL formats | and short links |
bilibili.com/video/BVxxxxxxxb23.tv| Danmaku | Do not use danmaku as teaching content (too noisy) |
Same as youtube-render-pdf — produce a professional Chinese lecture note with cover image, key frames, and synthesis section.
Same as youtube-render-pdf — search for official slides AND official lecture notes before downloading video.
Additional Bilibili-specific notes:
/export/pdf URL pattern; fall back to video frames if export failsPriority 1: CC subtitles
yt-dlp --write-subs --sub-langs "zh-Hans,zh-CN,zh,ai-zh" --convert-subs srt \
--skip-download -o "%(title)s.%(ext)s" "<URL>"
Priority 2: Whisper speech-to-text
yt-dlp -x --audio-format wav -o "audio.%(ext)s" "<URL>"
whisper audio.wav --model medium --language zh --output_format srt --output_dir .
Priority 3: Visual-only mode — skip subtitles, rely on dense frame sampling.
.tex fileai-course-notes/CLAUDE.md conventions for LaTeX structure, boxes, and figuresxelatex two passes) to resolve references[H] float placement for all figures\noteauthors to "基于公开课程资料整理" or "基于 [Speaker Name] 授课内容整理" — never "XX & Codex" or similar\notedate to the video's publish date or course semester — never \today\videourl with the URL the user provided\repourl{https://github.com/hqhq1025/ai-course-notes} unchanged from the template defaultassets/notes-template.tex: default LaTeX template to copy and fillEdit PDFs with natural-language instructions using the nano-pdf CLI.