← back to Crazy News Channel

daily-cartoons/run-daily.sh

16 lines

#!/bin/bash
# P24 daily editorial cartoons → LOCAL review queue (TK-12153, article-driven TK-12237). Never deploys.
# Still-image only by default (generate.py has no --video here on purpose — do not add it
# without an explicit Steve ask; see daily-cartoons/README.md).
# Usage: run-daily.sh [N=4]     env: P24_CARTOON_CAP_USD (default 1.00 daily hard cap)
set -uo pipefail
export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"
HERE="$(cd "$(dirname "$0")" && pwd)"
N="${1:-4}"
mkdir -p "$HERE/logs"
echo "=== $(date '+%F %T') run-daily N=$N cap=${P24_CARTOON_CAP_USD:-1.00}"
/usr/bin/env python3 "$HERE/generate.py" "$N"
rc=$?
echo "=== $(date '+%F %T') exit=$rc"
exit $rc