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.1.0.tar.gz (17.9 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.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for slides_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 05011ec329275feb614ddb38115de9190f2aa172e0d81414d642e967f2243b4e
MD5 16a542bbcf11e27b24783a0907a389ed
BLAKE2b-256 19e00b40ef87e11581e1252f2147240c4b3697c501bc950b25d1b65dabb55d83

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for slides_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7021716bc33b00998e98d75a186b24c556abccce80be91846bde68d40b6482b
MD5 16031606059a4e6f92f67f679a600b7f
BLAKE2b-256 83e3344903b24d4c021d0b1daf2c69bbccfcc21702f23e531bc0fe89d261d7e9

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