Skip to content

grahamzemel/spark-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

S'PARK 2BR Tracker — GitHub Actions Setup

Checks S'PARK Boulder's 2BR availability daily at 9 AM MT and emails grahamzemel@gmail.com whenever anything changes (unit listed, delisted, or rent changes).


Setup (5 minutes)

1. Create a GitHub repo

git init spark-tracker
cd spark-tracker
# Copy spark_check.py and .github/workflows/check.yml into this folder
git add .
git commit -m "init"
git remote add origin https://github.com/YOUR_USERNAME/spark-tracker.git
git push -u origin main

2. Get a free SendGrid account

  1. Go to sendgrid.com → Sign up free (100 emails/day free)
  2. Go to Settings → API Keys → Create API Key
  3. Name it spark-tracker, select Restricted Access → Mail Send → Full Access
  4. Copy the key (you only see it once)

3. Verify a sender email in SendGrid

  1. In SendGrid: Settings → Sender Authentication → Single Sender Verification
  2. Add any email you own (e.g. a Gmail alias, or your domain email)
  3. Verify it — this becomes your FROM_EMAIL

Gmail users: you can use Gmail as a sender if you verify it. Or just use any email you own.

4. Add secrets to GitHub

In your repo: Settings → Secrets and variables → Actions → New repository secret

Secret name Value
SENDGRID_API_KEY The API key from step 2
FROM_EMAIL The verified sender email from step 3

5. Enable Actions

Go to your repo → Actions tab → enable workflows if prompted.

That's it. The workflow runs every day at 9 AM MT. You can also trigger it manually from the Actions tab.


How it works

  • First run: saves a baseline state (spark_state.json in cache). No email.

  • Subsequent runs: diffs against baseline. Emails on any change:

    • 🟢 New unit listed
    • 🔴 Unit taken/removed
    • 🟡 Rent changed
    • ✨ New floor plan appeared
    • ⚠️ Floor plan removed
  • State is stored in GitHub Actions cache between runs (persists ~7 days of inactivity, resets if no runs)


Run locally

pip install requests beautifulsoup4 sendgrid
python spark_check.py

Without SENDGRID_API_KEY set, it just prints to terminal and skips the email.


Change the schedule

Edit .github/workflows/check.yml:

- cron: '0 15 * * *'   # 9 AM MDT / 8 AM MST daily
- cron: '0 15,21 * * *' # twice daily (9 AM + 3 PM MT)

Crontab guru is useful for this.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages