rfd-notify
This tool looks for matches on RedFlagDeals.com forums and will send push notifications via apprise.
This was originally written before alerts existed. With rfd-notify, alerts never expire and support regular expressions.
Prerequisites
- either poetry, docker, or github actions
- a free SendGrid API key is suggested for email notifications
Usage
The simplest way to get started is to clone this repo, and run with docker:
docker run -it -v "$(pwd)/examples/config.yml:/app/config.yml" ghcr.io/davegallant/rfd-notify:1
To run the code with poetry, clone this repo and run the following:
poetry install
poetry run python rfd_notify/cli.py -c examples/config.yml
Environment Variables
The following environment variables are required:
VARIABLE | DESCRIPTION |
---|---|
APPRISE_URL | See notifications. |
Example Configuration
Pass a list of expressions to be used for discovering deals:
# config.yml
expressions:
- pizza
- starbucks
- price error
Github Actions (and Gitea Actions)
An action can be setup to scan for deals, send a notification and store previously found deals in the repo.
It also requires the corresponding encrypted secrets setup.
# .github/workflows/rfd-notify.yml
on:
push:
schedule:
- cron: "*/5 * * * *"
jobs:
rfd_notify:
name: rfd-notify
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
id: cache
with:
path: previous_matches
key: previous-matches
- name: Run rfd-notify
uses: davegallant/rfd-notify@main
env:
APPRISE_URL: ${{ secrets.APPRISE_URL }}
- name: update cache on every commit
uses: actions/cache@v3
with:
path: previous_matches
key: previous-matches-${{ runner.os }}-${{ gitea.run_id }} # Can use time based key as well
restore-keys: |
previous-matches
Gitlab Pipelines
Create a scheduled pipeline to run on a regular interval.
With Gitlab Pipelines, the following configuration works:
#.gitlab-ci.yml
default:
image:
name: ghcr.io/davegallant/rfd-notify:1
entrypoint: [""]
run:
cache:
- key: previous_matches
paths:
- previous_matches
script:
- python /app/rfd_notify/cli.py -c config.yml