Files
arr-tui/dev/screenshots/posters.sh
T
nilsandClaude Opus 5.5 68c87bc3cd Screenshots: Trakt lists, Trakt in the Config view
The fake services gain a Trakt API (port 19894) and a sequel that is not
in the library; a new scene shows the Anticipated list. The other
pictures are retaken (Config has the Trakt section, the search status
bar mentions [ ] lists, the calendar is two days on).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 23:05:35 +02:00

23 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Generate a poster for every title in catalog.py: a gradient with the title
# and year, 500x750 JPEG in posters/. Needs ImageMagick 7 and fontconfig.
set -euo pipefail
cd "$(dirname "$0")"
font=$(fc-match -f '%{file}' 'DejaVu Serif:style=Bold')
small=$(fc-match -f '%{file}' 'DejaVu Sans')
mkdir -p posters
python3 -c '
import catalog
for m in catalog.MOVIES: print("m%d|%s|%d|%s|%s" % (m[0], m[1], m[2], m[10][0], m[10][1]))
for s in catalog.SERIES: print("s%d|%s|%d|%s|%s" % (s[0], s[1], s[2], s[7][0], s[7][1]))
u = catalog.UPCOMING; print("m%d|%s|%d|%s|%s" % (u[0], u[1], u[2], u[3][0], u[3][1]))
' | while IFS='|' read -r id title year c1 c2; do
magick -size 500x750 "gradient:$c1-$c2" \
\( -size 420x320 -background none -fill white -font "$font" -gravity center caption:"$title" \) \
-gravity north -geometry +0+120 -composite \
\( -size 420x60 -background none -fill '#ffffffcc' -font "$small" -pointsize 30 -gravity center caption:"$year" \) \
-gravity south -geometry +0+70 -composite \
-quality 88 "posters/$id.jpg"
done