Skip to content
ashilrafique97-labPublic

About

A watch script for the BFI screenings of dune + odyssey

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

BFI IMAX Watch

Monitors selected BFI IMAX film pages and sends notifications when new buyable screenings appear.

Currently watches:

  • The Odyssey
  • Dune: Part Three

The script stores previous results in data/state.json so it can detect changes without sending repeated alerts.

Requirements

You need:

  • Docker
  • Docker Compose

Setup

Copy the environment example:

cp .env.example .env

Edit .env:

nano .env

Add your Discord webhook URL:

DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/YOUR_WEBHOOK_HERE

Home Assistant is optional. Leave it blank if you do not use it:

HA_WEBHOOK_URL=

Build

Build the Docker image:

docker compose build

First run

Run once to create the baseline state:

docker compose run --rm bfi-watch python /app/watch_bfi.py --debug

The first run usually does not send an alert. It saves the current screenings as the baseline.

Normal run

docker compose run --rm bfi-watch

Test notification

This sends a fake test notification:

docker compose run --rm bfi-watch python /app/watch_bfi.py --test --debug

Warning: this saves the fake test entry into the normal data/state.json.

For a safe test that does not touch the main state file, use a separate test folder:

mkdir -p test-data
cp data/state.json test-data/state.json

docker compose run --rm \
  -v "$PWD/test-data:/data" \
  bfi-watch \
  python /app/watch_bfi.py --test --debug

Run the same command again. The second run should not alert again.

After testing:

rm -rf test-data

Cron

To run automatically every 5 minutes:

crontab -e

Add this line, changing /path/to/bfi-watch to the actual folder path:

*/5 * * * * cd /path/to/bfi-watch && echo "===== $(date) =====" >> cron.log && docker compose run --rm -T bfi-watch >> cron.log 2>&1

Example:

*/5 * * * * cd /home/ashil/bfi-watch && echo "===== $(date) =====" >> cron.log && docker compose run --rm -T bfi-watch >> cron.log 2>&1

View logs

Show the latest log entries:

tail -n 80 cron.log

Watch logs live:

tail -f cron.log

Exit live view with:

Ctrl + C

Reset state

If you want to reset the saved baseline:

rm data/state.json
docker compose run --rm bfi-watch python /app/watch_bfi.py --debug

The next run will create a fresh baseline.

What triggers an alert?

The script alerts when:

  • a new buyable screening appears
  • an existing screening changes to BUY

It tries to avoid alerts for:

  • sold-out changes
  • minor text changes
  • hidden page text changes
  • button wording changes
  • repeated already-seen screenings

Important security note

Do not share your real .env file.

Anyone with your Discord webhook URL can post messages into your Discord channel.

About

A watch script for the BFI screenings of dune + odyssey

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages