Skip to content

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

digit-rss-tracker - Setup Guide

Repository to track an author on digit and notify when he posts an article (made to track a goated friend named vyom ramani)

What you're setting up

A Python script that runs daily on your Hetzner server, checks Vyom's RSS feed on digit.in, and sends a push notification to your phone via ntfy when a new article is posted.

The script validates the feed is reachable before doing anything, stores a list of articles it's already notified you about, and only pings you for new ones.


Before you start — what you need on your machine

You already ran test_feed.py locally and confirmed the feed works. Good. Now you just need to SSH into your server. On Mac, Terminal is all you need — it's built in, no extra software required.


Step 1 — Phone setup (do this first)

  1. Install the ntfy app on your phone:

  2. Open the app → tap the "+" button → enter a topic name

    • A topic is just your personal notification channel — like a secret radio frequency. Anyone who knows the name can subscribe, so make it hard to guess.
    • Good example: vyom-digit-ansh-7k3x2
    • Bad example: vyom or digit (too guessable)
    • Write it down — you'll need it in Step 4

Step 2 — SSH into your server

Open Terminal on your Mac and run:

ssh root@YOUR_SERVER_IP

Replace YOUR_SERVER_IP with your Hetzner server's IP address. You'll be dropped into a command prompt on your server.


Step 3 — Create the project folder and add the script

Create a folder for the project:

mkdir -p ~/digit-rss-tracker
cd ~/digit-rss-tracker

Now open a new file called checker.py in nano (a simple terminal text editor):

nano checker.py

Paste the full contents of checker.py here, then:

  • Ctrl+O → Enter (saves the file)
  • Ctrl+X (exits nano)

Step 4 — Set your ntfy topic in the script

Open the script again:

nano checker.py

Find this line near the top:

NTFY_TOPIC = "YOUR_SECRET_TOPIC_HERE"

Change it to your actual topic name from Step 1, e.g.:

NTFY_TOPIC = "vyom-digit-ansh-7k3x2"

Save and exit (Ctrl+O → Enter → Ctrl+X).


Step 5 — Install dependencies

Your server needs two Python libraries. Run these commands:

# Check Python 3 is available — should print something like 3.10.x or 3.11.x
python3 --version

# Install pip (Python's package manager) if it's not already there
sudo apt update && sudo apt install python3-pip -y

# Install the two libraries the script uses:
# feedparser → reads and parses RSS feeds
# requests   → makes HTTP calls (used for both feed fetching and ntfy notification)
pip3 install feedparser requests --break-system-packages

The --break-system-packages flag is needed on newer Ubuntu versions — it just tells pip it's okay to install into the system Python environment.


Step 6 — Run the script manually to test it

cd ~/digit-rss-tracker
python3 checker.py

Expected output on first run:

─── Digit Article Checker ───
[→] Validating feed: https://www.digit.in/author/vyomramani/feed/
[✓] Feed is valid. Found 10 articles in feed.
[✓] Notified: Sam Altman investigation: 6 crazy revelations
[✓] Notified: Sam Altman to blame? Why Microsoft and OpenAI are drifting apart
... (one line per article)
[✓] Done — 10 new article(s) notified.
─────────────────────────────

Your phone will buzz for all 10 current articles — that's completely expected. The script is marking them all as "already seen" so on every future run it only notifies you about genuinely new ones.

If the feed is unreachable for any reason you'll see:

[✗] Feed validation failed: Feed URL returned HTTP 404.
    No notifications sent. Will try again next run.

Step 7 — Set up the daily cron job

Cron is Linux's built-in task scheduler. You write one line telling it when to run your script, and it handles it automatically forever — even after reboots.

Open the cron editor:

crontab -e

If it asks which editor to use, pick nano (option 1).

Add this line at the very bottom of the file:

0 9 * * * /usr/bin/python3 /root/digit-rss-tracker/checker.py >> /root/digit-rss-tracker/checker.log 2>&1

Breaking down what each part means:

0 9 * * *       → when to run. Format is: minute | hour | day | month | weekday
                  0 9 * * * = at minute 0 of hour 9 = 9:00 AM, every day
/usr/bin/python3          → full path to Python. Cron needs full paths, not shortcuts
/root/digit-rss-tracker/checker.py → your script, also full path
>> checker.log            → append all printed output to a log file
2>&1                      → also capture any errors into the same log file

Save and exit (Ctrl+O → Enter → Ctrl+X). Cron will confirm: "crontab: installing new crontab"


Changing the schedule

Want to check every 2 days instead of daily?

0 9 */2 * *     → 9am every 2 days

Every 12 hours:

0 */12 * * *    → midnight and noon every day

Checking the log anytime

To see what the script has been doing:

cat ~/digit-rss-tracker/checker.log

Each run appends to this file so you have a full history.


Files on your server after setup

~/digit-rss-tracker/
├── checker.py          ← the main script
├── seen_articles.txt   ← auto-created on first run, one URL per line
└── checker.log         ← auto-created by cron, full run history

Updating the author or ntfy topic

To track a different author, open checker.py and change FEED_URL at the top. To change your ntfy topic, change NTFY_TOPIC and update your phone subscription.

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages