一键导入
bilibili-render-pdf
// 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.
// 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.
Use when the user provides a YouTube URL and wants LaTeX course notes rendered as PDF. Triggers: YouTube link, '这个视频', '整理这节课', 'YouTube 笔记'.
Use when the user provides a URL to a web article, blog post, or X Article and wants LaTeX notes rendered as PDF. Triggers: article/blog URL, '整理这篇文章', '文章笔记'. Handles translation detection (traces back to original).
| name | bilibili-render-pdf |
| description | 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 | bilibili.com/video/BVxxxxxxx and b23.tv short links |
| 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>"
tools/scripts/transcribe_faster_whisper.py audio.wav \
--out-prefix transcript.zh \
--model large-v3 \
--device cuda \
--compute-type float16 \
--language zh
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../video-render-common/writing-and-figures.md; do not mark the note complete until rendered pages have been inspected and layout/rendering issues fixed[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 fill