Skip to main content

Convert PDF slides to beautiful grid images

Project description

slides-cli

A beautiful CLI tool for converting PDF slides to grid images.

Installation

cd slides-cli
uv sync

Usage

Convert PDFs to slide grids

# Convert a single PDF
slides convert lecture.pdf

# Convert all PDFs in a directory
slides convert ./pdfs/

# Convert with custom layout (2x2 grid instead of default 3x2)
slides convert slides.pdf --layout 2x2

# Lower DPI for smaller file sizes
slides convert slides.pdf --dpi 150

# Output to specific directory
slides convert slides.pdf -o ./output/

# Convert to JPEG with quality setting
slides convert slides.pdf --format jpeg --quality 90

# Process multiple PDFs in parallel (8 jobs)
slides convert ./pdfs/ --jobs 8

# Recursive search in subdirectories
slides convert ./docs/ --recursive

# Preview without actually converting (dry run)
slides convert *.pdf --dry-run

List PDFs

# List PDFs in current directory
slides list

# List PDFs in a specific directory
slides list ./pdfs/

# Recursive listing
slides list ./docs/ -r

Get PDF info

slides info document.pdf

Shows page count, dimensions, file size, and how many grid images each layout would produce.

Configuration

# Show current configuration
slides config

# Create a config file in current directory
slides config --init

Configuration File

Create a .slides.toml file in your project or home directory:

[convert]
layout = "3x2"      # Grid layout (ROWSxCOLS)
dpi = 200           # Resolution (72-600)
format = "png"      # Output format (png, jpeg)
quality = 85        # JPEG quality (1-100)
margin = 3.0        # Margin percentage (0-20)
jobs = 4            # Parallel jobs (1-32)

Options Reference

slides convert

Option Short Description Default
--output -o Output directory Same as PDF
--layout -l Grid layout (e.g., 3x2, 2x2, 4x3) 3x2
--dpi -d Resolution (72-600) 200
--format -f Output format (png, jpeg) png
--quality -q JPEG quality (1-100) 85
--margin -m Margin percentage (0-20) 3.0
--force -F Overwrite existing files false
--recursive -r Search directories recursively false
--jobs -j Parallel jobs (1-32) 4
--dry-run -n Preview without executing false
--quiet -Q Minimal output false

Examples

Convert lecture slides with 2x3 layout

slides convert "my_file.pdf" --layout 2x3 -o ./grids/

Batch convert with preview

# First, see what will happen
slides convert ./lectures/ --dry-run

# Then convert
slides convert ./lectures/

Small file sizes for web

slides convert slides.pdf --format jpeg --quality 80 --dpi 150

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slides_cli-0.2.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slides_cli-0.2.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file slides_cli-0.2.0.tar.gz.

File metadata

  • Download URL: slides_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.6

File hashes

Hashes for slides_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f64802fcfa6f48285bfa258dcbc8a27172c4107a94593079af35ba4658218e12
MD5 e990aff758b7af964beaa1329bc8fc18
BLAKE2b-256 f5a25a38b7ad96e2d979f5a6e3e14eead8e9ca32cee427f51313b9918120b696

See more details on using hashes here.

File details

Details for the file slides_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: slides_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.6

File hashes

Hashes for slides_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7005ddf7e4310598be2c0df3f26d58849d02d787a0862f74ff4f847f54445c6f
MD5 e1cc6b25ffee1e427b2a879fdf4f9e72
BLAKE2b-256 d22ae78b49a793360af8d49c0f90c8dfd857f784089e31f773f6e65d3f0df6bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page