get notified of deals based on regex
  • Python 90.4%
  • Dockerfile 8.3%
  • Shell 1.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
renovate[bot] bdc0253a3a
Update astral-sh/setup-uv action to v10.3.3 (#492)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dave Gallant <davegallant@proton.me>
2026-11-01 09:01:27 -05:00
.github/workflows Update astral-sh/setup-uv action to v10.3.3 (#492) 2026-11-01 09:01:27 -05:00
examples Migrate to python (#265) 2023-02-20 23:23:29 -05:00
github-action Remove html formatting in notifications to support other notification systems 2025-02-13 20:10:42 -05:00
rfd_notify fix(gotify): remove unsupported link target syntax 2026-10-13 23:32:43 -04:00
.dockerignore Use python:3.11-slim-buster base for now 2023-02-25 14:23:35 -05:00
.gitignore Migrate to python (#265) 2023-02-20 23:23:29 -05:00
.pre-commit-config.yaml chore(deps): migrate project to uv 2026-10-14 07:16:43 -04:00
.pylintrc Migrate to python (#265) 2023-02-20 23:23:29 -05:00
action.yml Add initial Action (#40) 2020-10-26 00:35:19 -04:00
AGENTS.md fix(gotify): satisfy formatting and lint checks 2026-10-13 16:48:38 -04:00
Dockerfile Update ghcr.io/astral-sh/uv Docker tag to v0.13.6 (#494) 2026-11-01 09:00:27 -05:00
LICENSE Update LICENSE (#85) 2021-04-04 10:38:04 -04:00
pyproject.toml Update dependency apprise to v2 (#482) 2026-11-01 09:00:39 -05:00
README.md docs: refresh usage and deployment guidance 2026-10-15 07:21:39 -04:00
renovate.json Change Renovate schedule to run on the 1st of the month 2026-06-06 07:30:07 -04:00
uv.lock Update dependency apprise to v2 (#482) 2026-11-01 09:00:39 -05:00

rfd-notify

rfd-notify scans the latest posts in the RedFlagDeals Hot Deals forum and sends a notification when a topic title or dealer name matches one of your expressions. Expressions use Python regular expression syntax and are matched without regard to case.

Matches are remembered in a local database so the same topic is only reported once.

Requirements

  • Docker, or uv with Python 3.10 or newer
  • An Apprise URL in the APPRISE_URL environment variable

If APPRISE_URL is missing, the scan still runs but notifications are skipped.

Configuration

Create a config.yml with an expressions list. Each expression is searched in the topic title and, when available, the dealer name.

expressions:
  - pizza
  - starbucks¸¸¸¸
  - price error
  - ontario(.*)grocery

Patterns are passed to Python's re module. Invalid regular expressions will stop the scan.

Run with Docker

Build the image, then mount your configuration and match database so the database persists across runs:

docker build -t rfd-notify .
mkdir -p data
docker run --rm \
  -e APPRISE_URL \
  -v "$PWD/config.yml:/app/config.yml:ro" \
  -v "$PWD/data:/app/data" \
  rfd-notify --storage-path /app/data/previous_matches

The container expects /app/config.yml; the example configuration is available at examples/config.yml.

Run with uv

uv sync
APPRISE_URL='your-apprise-url' uv run python rfd_notify/cli.py --config examples/config.yml

The command defaults to a previous_matches database in the current directory. Use --storage-path to choose another location:

uv run python rfd_notify/cli.py --config examples/config.yml --storage-path data/previous_matches

GitHub Actions

Run the action on a schedule and preserve previous_matches in the repository between runs. Add an APPRISE_URL repository secret and grant the workflow permission to write repository contents.

name: rfd-notify

on:
  schedule:
    - cron: "*/5 * * * *"
  workflow_dispatch:

permissions:
  contents: write

jobs:
  notify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run rfd-notify
        uses: davegallant/rfd-notify@main
        env:
          APPRISE_URL: ${{ secrets.APPRISE_URL }}
      - name: Save match history
        run: |
          git config user.name "github-actions[bot]"
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
          git add previous_matches
          git diff --cached --quiet || git commit -m "Update previous_matches"
          git push

The workflow expects config.yml at the repository root. The action reads it and uses previous_matches in its working directory. You can use the same steps in Gitea Actions with the corresponding checkout action and secret configuration.

GitLab Pipelines

Create a scheduled pipeline, configure APPRISE_URL as a CI/CD variable, and keep the match database in the job cache:

default:
  image:
    name: ghcr.io/davegallant/rfd-notify:2
    entrypoint: [""]

run:
  cache:
    key: previous_matches
    paths:
      - previous_matches
  script:
    - python /app/rfd_notify/cli.py --config config.yml

This expects config.yml in the repository root.

Notifications

Notification bodies use Markdown and include a clickable topic title, post age, and the expression that matched. For Gotify, set Markdown formatting in the Apprise URL, for example:

gotifys://gotify.example.com/APP_TOKEN?format=markdown