pamelafox/presentation-skills

fetch-slides

Fetch presentation slides from a URL and convert them to PDF.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/pamelafox/presentation-skills --skill fetch-slides

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

Fetch slides from a URL

Run the fetch_slides.py script to download and convert slides:

bash
uv run fetch_slides.py <url> <output_dir>

Arguments

  • url (required): URL of the slides. Supported formats:
  • Direct PDF URL (e.g., https://example.com/slides.pdf)
  • PPTX URL (auto-detected via Content-Type header)
  • OneDrive sharing link (e.g., https://onedrive.live.com/:p:/g/personal/... or https://1drv.ms/...)
  • RevealJS HTML presentation URL (e.g., https://example.com/slides/)
  • output_dir (required): Directory to save output files. Created if it doesn't exist.

Outputs

  • slides.pdf — Always produced. The presentation as a PDF file.
  • slides_content.md — Only for RevealJS presentations. Contains extracted text content and links from each slide, with section headings marked.

Prerequisites

  • For PPTX conversion: LibreOffice must be installed
  • macOS: brew install --cask libreoffice
  • Ubuntu: apt-get install libreoffice
  • For RevealJS presentations: Playwright browsers must be installed
  • uv run playwright install chromium

How it works

  1. The script makes an HTTP HEAD request to detect the content type
  2. Based on the content type:
  • PDF: Downloads directly
  • PPTX: Downloads the file, then converts to PDF using LibreOffice (headless mode)
  • OneDrive: Converts the sharing URL to a direct download URL (appends ?download=1), then handles as PDF or PPTX
  • RevealJS HTML: Uses Playwright to open the presentation with ?print-pdf appended, renders to PDF. Also parses the HTML to extract slide text content and links.
来自同一仓库

更多 Skills

全部 Skills