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
Release history Release notifications | RSS feed
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.1.tar.gz
(18.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slides_cli-0.2.1.tar.gz.
File metadata
- Download URL: slides_cli-0.2.1.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c494793cfd126e998f88bcacbb3b40488f53adbb562fa917fb002fd444206158
|
|
| MD5 |
1e1ed63e7d8bb1da2c8d763620026f7c
|
|
| BLAKE2b-256 |
9559065e520dbcfc503f609716dbef6c2d4d875e4b911f09122b8c9af9ed1ded
|
File details
Details for the file slides_cli-0.2.1-py3-none-any.whl.
File metadata
- Download URL: slides_cli-0.2.1-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
186e07190437405c55c81d18f7fd0483a7caabc931ca1d7d454e642d8e2b9f88
|
|
| MD5 |
b8f1d4e97affdb2348ed2a08d97cefa0
|
|
| BLAKE2b-256 |
b12dd2380b411d278f62683406c1a24e48c3dad91f982e4b438b09f0bf75efc7
|