NotebookLM to Editable PPTX Conversion
Overview
NotebookLM currently generates PowerPoint (.pptx) presentations where every slide is a flattened, uneditable image. When you need to convert a NotebookLM export into an editable .pptx file, leverage this skill.
This workflow uses a native macOS Swift script (Vision framework) for highly accurate OCR on the images, followed by programmatic reconstruction of the presentation using python-pptx.
Prerequisites Ensure
python3andpipare installed.- The python module
python-pptxis installed:pip3 install python-pptx - A macOS environment (the Swift OCR script relies on Apple's
Visionframework).
Workflow
Follow these steps precisely:
1. Extract Images from the NotebookLM PPTX
Use the extract_images.py script provided in this skill's scripts/ folder to pull the PNG images out of the uneditable presentation.
# Locate the script first
export SKILL_DIR=$(dirname $(find ~ -name "extract_images.py" | grep "notebooklm-to-editable-pptx" | head -n 1))
# Extract images to a temporary directory
mkdir -p /tmp/pptx_images
python3 "$SKILL_DIR/extract_images.py" "path/to/NotebookLM_Export.pptx" /tmp/pptx_images
2. OCR the Extracted Images
Use the ocr.swift script to perform Optical Character Recognition (OCR) on all the extracted PNG files. Save the output to a text file for analysis.
# Clear the text file first
> /tmp/pptx_extracted_text.txt
# Run OCR on all extracted slides (Slide count must match the extraction output)
for i in /tmp/pptx_images/*.png; do
echo "--- $i ---" >> /tmp/pptx_extracted_text.txt
swift "$SKILL_DIR/ocr.swift" "$i" >> /tmp/pptx_extracted_text.txt
done
3. Analyze the Extracted Text
Read the /tmp/pptx_extracted_text.txt file and carefully parse the content for each slide:
- Distinguish between Title text, Body points, and Table Data.
- Identify the logical structure.
4. Generate the Editable PPTX
Write a custom Python script for the specific presentation using python-pptx. Map the extracted OCR text into real, editable python-pptx Layouts (such as Title Slides, Title and Content, Tables, etc.).
Guidelines for the generation script:
- Use
prs = Presentation() prs.slide_layouts[0]is for Title Slides.prs.slide_layouts[1]is for Title and Content (bullet points).- For tables, use
prs.slide_layouts[5](Title Only) and draw a table viaslide.shapes.add_table(rows, cols, left, top, width, height). - Reconstruct the slide content logically based on your OCR analysis.
# Example generic execution
python3 custom_pptx_generator.py
When to Use
This skill applies whenever a user uploads a PowerPoint (.pptx) generated by NotebookLM (or any presentation where the slides are purely flattened images) and explicitly requests to make the text "editable", "convert to a real PPTX", or "recreate the layout".