testsAndMisc/python_pkg/cinema_planner/run.sh
Krzysztof kuhy Rudnicki f557c22e7c feat(screen_locker): harden table tennis verification, remove running option
- Remove 'Running' workout option (too easy to fake)
- Add MIN_TABLE_TENNIS_SETS=15 minimum requirement
- Add MIN_POINTS_PER_SET=11 mathematical cross-check
- Add TABLE_TENNIS_SUBMIT_DELAY=60 (increased from 30)
- Add verification question before unlock (total points/avg/diff)
- Require minimum duration per set (2 min/set)
2026-02-02 21:38:52 +01:00

45 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
# Run cinema planner with Cinema City schedule from Downloads
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
DOWNLOADS="$HOME/Downloads"
# Show help if requested
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
echo "Usage: ./run.sh [OPTIONS]"
echo ""
echo "Automatically finds Cinema City HTML schedule in ~/Downloads"
echo ""
echo "Options:"
echo " -l, --list List all movies without scheduling"
echo " -x, --exclude Exclude movies by name (comma-separated)"
echo " -g, --exclude-genre Exclude additional genres (comma-separated)"
echo " --all-genres Include all genres (disable Horror auto-exclusion)"
echo " -b, --buffer N Buffer time between movies (default: 0)"
echo " -m, --must-watch Only show schedules containing this movie"
echo " -n, --max-schedules Max number of schedule options to show (default: 5)"
echo ""
echo "Examples:"
echo " ./run.sh # Plan optimal schedule"
echo " ./run.sh -x 'Avatar,Sonic' # Exclude specific movies"
echo " ./run.sh -g 'Thriller,Dramat' # Also exclude Thriller and Drama"
echo " ./run.sh --all-genres # Include Horror movies"
echo " ./run.sh -m 'Hamnet' # Only schedules with Hamnet"
exit 0
fi
# Find the most recent Cinema City HTML file
HTML_FILE=$(find "$DOWNLOADS" -maxdepth 1 -name "Repertuar*.html" -type f -printf '%T@ %p\n' 2>/dev/null | sort -rn | head -1 | cut -d' ' -f2-)
if [ -z "$HTML_FILE" ]; then
echo "No Cinema City schedule found in $DOWNLOADS"
echo "Download the schedule from cinema-city.pl first"
exit 1
fi
echo "Using: $HTML_FILE"
echo ""
# Run the planner with any additional arguments passed to this script
"$SCRIPT_DIR/cinema_planner.py" "$HTML_FILE" "$@"