SuperAPI AI Directory

laohan-notebooklm

Office & productivity

View repository

Updated 10-16 14:57

About this skill

Voiceover Script Slide Generation

Positioning (2026-09-20 Governance P2-20): Research aid tool, not a production pipeline; visual assets for production videos go through the local asset library/network asset contract (⑩) or animation implementation (⑪), not through this tool.

One-click generation of slide images from voiceover scripts, output to the slides/ subdirectory at the same level as script.md, for direct use in CapCut.

Core Concept

No prompts, no layout requirements—NotebookLM performs best when left to its own devices. The output is semi-finished images; layout and formatting are adjusted in CapCut, don't waste time here.

Not Applicable Scenarios

  • Want precise control over each page's content and layout → NotebookLM doesn't support this, use python-pptx to manually generate the PPT
  • Generate English slides → change --language en-US, but this skill defaults to Chinese scenarios
  • No nlm CLI or network cannot access NotebookLM → install dependencies first, resolve network issues

Usage

/laohan-notebooklm <script.md路径>

Process

Each step may experience SSL timeout; add retries (max 3 times, 3-second interval).

0. Preparation

  • Determine the output directory from the script.md path: the slides/ subdirectory under the directory where script.md is located
  • SCRIPT_DIR=$(dirname "$SCRIPT"),OUTPUT="$SCRIPT_DIR/slides"
  • mkdir -p "$OUTPUT"
  • cp "$SCRIPT" "$OUTPUT/script.md"
  • Confirm the network can access NotebookLM (switch network environment when REGION_NOT_SUPPORTED occurs)

1. Create Notebook

nlm notebook create "<标题>PPT"

Record the returned NOTEBOOK_ID.

2. Upload Materials

nlm source add NOTEBOOK_ID --file "$OUTPUT/script.md"

Only upload the original voiceover script, without adding any prompts or guidance annotations.

3. Trigger Generation

echo "y" | nlm slides create NOTEBOOK_ID --language zh-CN --length default

--language zh-CN is key; omitting it generates the English version.

4. Poll + Download + Convert to Images (Background Script)

Must use a single background script to complete polling, downloading, and image conversion in one go. Use the Bash tool's run_in_background: true to execute:

NB="NOTEBOOK_ID"
TITLE="<标题>"
OUTPUT="<script.md所在目录>/slides"

for i in $(seq 1 20); do
  st=$(nlm studio status "$NB" 2>&1 | grep -o '"status": "[^"]*"' | head -1)
  echo "[$i] $st"
  echo "$st" | grep -q "completed" && break
  sleep 30
done

for i in 1 2 3; do
  nlm download slide-deck "$NB" -o "${OUTPUT}/${TITLE}.pdf" 2>&1 && break
  sleep 5
done

pdftoppm -png -r 200 "${OUTPUT}/${TITLE}.pdf" "${OUTPUT}/slide"
echo "Done: $(ls "${OUTPUT}"/slide-*.png | wc -l | tr -d ' ') slides"

After the background completes, read the output to confirm the number of images and inform the user.

Output

<script.md所在目录>/slides/
├── script.md
├── <标题>.pdf
├── slide-01.png
├── slide-02.png
└── ...

Key Principles

  • No prompts: only upload the original voiceover script, NotebookLM performs best when left to its own devices
  • No layout requirements: layout is adjusted in CapCut
  • Output to the slides/ directory at the same level as script.md, managed uniformly with other materials

Prerequisites

  • nlm CLI v0.5.25(pip install notebooklm-mcp-cli)
  • poppler(brew install poppler)