Generate printable A5 pages and EPUBs for a media catalog from a CSV of IMDb IDs.
Project description
MediaCatalog (A5 Binder Pages)
Generate printable A5 pages for a movie catalog from a CSV containing IMDb links/IDs. The tool fetches metadata via the OMDb API, renders one page per movie, and also produces a combined PDF for printing.
License: GPL-3.0-or-later
Features
- One movie per page (A5 PDF) plus optional reflowable EPUB.
- Genre sections with right-edge colored tabs for quick visual scanning.
- Series-aware sorting and per-page series labels.
- Optional list badges (AFI, IMDb Top 250, BFI Sight & Sound, Palme d'Or).
- Poster caching to speed up repeated runs.
Quick Start
- Install dependencies:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- Set your OMDb API key:
export OMDB_API_KEY="your_key_here"
Alternatively, add it to a .env file in the repo root:
OMDB_API_KEY=your_key_here
- Prepare a CSV (example):
imdb,genre_override,series
https://www.imdb.com/title/tt0111161/,Drama,
https://www.imdb.com/title/tt0068646/,Crime,
- Generate PDFs:
python -m media_catalog --input movies.csv
Output:
- Per-movie pages in
output/pages/ - Combined PDF at
output/catalog.pdf - Optional EPUB at
output/catalog.epubwhen--epubis used.
Options
--imdb-column: column name for IMDb links/IDs (default:imdb)--output-dir: output directory (default:output)--pages-dir: subdirectory for per-movie PDFs (default:pages)--combined: combined PDF filename (default:catalog.pdf)--epub: generate an EPUB alongside the PDFs--epub-name: EPUB filename (default:catalog.epub)--left-margin-mm: left margin in mm for hole punch clearance (default:25)--no-poster: skip poster downloads--cache-dir: directory to cache OMDb responses (default:.cache/omdb)--no-cache: disable cache reads and writes
Note: For TV series, the tool may make additional OMDb calls to count total episodes by season. These responses are also cached.
Poster images are cached under <cache-dir>/posters to avoid repeated downloads.
CSV supports an optional genre_override column to control grouping order.
Add an optional series column to group series entries, which are sorted by release year.
The title column is updated on each run with the OMDb title for easier editing.
Plots are fetched in full and truncated to a length threshold; short plots are only used when the full plot is a placeholder.
PDF pages include a right-edge color tab per genre, evenly spaced down the edge.
Public Repo Tips
- Use
movies.example.csvas a template; keep your personalmovies.csvprivate. - Generated output is excluded via
.gitignore.
Sample Output
Generate sample PDFs and EPUB from the example CSV:
python -m media_catalog --input movies.example.csv --epub
Sample files (generated from movies.example.csv):
samples/catalog.pdfsamples/catalog.epub
Publishing
PyPI
- Build:
python -m build
- Upload:
python -m twine upload dist/*
Automated release: push a tag like v0.1.1 and GitHub Actions will build and publish.
Install after publishing:
pip install mediacatalog
Homebrew
- Create a GitHub release (tag like
v0.1.0). - Update
packaging/homebrew/mediacatalog.rbwith the tarball URL and SHA256. - Publish the formula in a tap repo (e.g.,
homebrew-media-catalog).
Install after publishing:
brew tap YOUR_GITHUB_USER/tap
brew install mediacatalog
Contributing
Issues and PRs are welcome. If you add new features, please update the README and include a short example in movies.example.csv.
The tool marks movies that appear in the AFI Top 100 lists (1998 and 2007), stored in media_catalog/data/afi_top_100_1998.csv and media_catalog/data/afi_top_100_2007.csv. It also supports optional lists for media_catalog/data/imdb_top_250.csv, media_catalog/data/imdb_top_250_tv.csv, media_catalog/data/cannes_palme_dor.csv, and media_catalog/data/bfi_sight_sound.csv. List files use title,year,rank,imdb_id columns; populate imdb_id to match by IMDb ID, otherwise it falls back to title + year matching.
Notes
- A5 size is used with a wider left margin to allow for hole punching. Adjust
--left-margin-mmafter a test print. - OMDb data is subject to their terms. Use your own API key.
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
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 mediacatalog-0.1.1.tar.gz.
File metadata
- Download URL: mediacatalog-0.1.1.tar.gz
- Upload date:
- Size: 494.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c7d759fb9f5e51496f15306cf36562c12fdf4367a34a090e6a91c57f91e7acf
|
|
| MD5 |
1e6b6a8dd56cd31df3816f178d6148f1
|
|
| BLAKE2b-256 |
0d28a576753116a229b3c1c1c5e9e61b195f23aae16252e82a6c2bdf8a666233
|
Provenance
The following attestation bundles were made for mediacatalog-0.1.1.tar.gz:
Publisher:
publish.yml on AnalogGhost/mediacatalog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mediacatalog-0.1.1.tar.gz -
Subject digest:
5c7d759fb9f5e51496f15306cf36562c12fdf4367a34a090e6a91c57f91e7acf - Sigstore transparency entry: 781785550
- Sigstore integration time:
-
Permalink:
AnalogGhost/mediacatalog@7b73c967d2de03569e39be700678217c9ea39576 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/AnalogGhost
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7b73c967d2de03569e39be700678217c9ea39576 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mediacatalog-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mediacatalog-0.1.1-py3-none-any.whl
- Upload date:
- Size: 485.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34293d0c028d389ec3406d15e1a04f7cfacf94b5cd46f0d86a746eb149daa88f
|
|
| MD5 |
920ae66b2b4361b1bc74ce12eae8f5c5
|
|
| BLAKE2b-256 |
4011dd297d2afdded9fa3b2dcac1d397da624fe04608c45ea95a47ed460b69fa
|
Provenance
The following attestation bundles were made for mediacatalog-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on AnalogGhost/mediacatalog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mediacatalog-0.1.1-py3-none-any.whl -
Subject digest:
34293d0c028d389ec3406d15e1a04f7cfacf94b5cd46f0d86a746eb149daa88f - Sigstore transparency entry: 781785556
- Sigstore integration time:
-
Permalink:
AnalogGhost/mediacatalog@7b73c967d2de03569e39be700678217c9ea39576 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/AnalogGhost
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7b73c967d2de03569e39be700678217c9ea39576 -
Trigger Event:
push
-
Statement type: