Skip to content

scottjamesrogers/reddit-notifications

Repository files navigation

Usenet Indexer Registration Monitor

This application monitors the r/usenet subreddit for posts about open registrations for usenet indexers and sends email notifications when such posts are detected. It uses OpenAI's GPT-3.5-turbo model to intelligently analyze posts and determine if they're announcing registration opportunities.

Setup

  1. Create a Reddit API application:

    • Go to https://www.reddit.com/prefs/apps
    • Click "create another app..."
    • Select "script"
    • Fill in the name and description
    • For "redirect uri", enter: http://localhost:8080
    • Note down the client ID (under the app name) and client secret
  2. Configure email settings:

    • If using Gmail, you'll need to create an App Password:
      • Go to your Google Account settings
      • Security > 2-Step Verification > App passwords
      • Generate a new app password for this application
  3. Set up OpenAI API:

    • Go to https://platform.openai.com/api-keys
    • Create a new API key
    • Note: You'll need to have an OpenAI account with billing set up
    • The API key will be used to analyze posts using GPT-3.5-turbo
  4. Install dependencies:

    pip install -r requirements.txt
  5. Configure the application:

    • Copy .env.example to .env:
      cp .env.example .env
    • Edit .env and fill in your credentials:
      • REDDIT_CLIENT_ID: Your Reddit app client ID
      • REDDIT_CLIENT_SECRET: Your Reddit app client secret
      • REDDIT_USER_AGENT: A unique identifier for your app (e.g., "usenet_monitor:v1.0")
      • REDDIT_USERNAME: Your Reddit username
      • REDDIT_PASSWORD: Your Reddit password
      • EMAIL_SENDER: Your email address
      • EMAIL_PASSWORD: Your email password (or app password)
      • EMAIL_RECIPIENT: The email address to receive notifications
      • OPENAI_API_KEY: Your OpenAI API key

Usage

Run the monitor:

python reddit_monitor.py

The application will:

  • Check for new posts every 5 minutes
  • Use GPT-3.5-turbo to analyze posts for registration opportunities
  • Send email notifications when relevant posts are found
  • Only notify about posts from the last hour to avoid duplicates

Post Analysis

The application uses GPT-3.5-turbo to analyze posts based on the following criteria:

  1. Is the post announcing a new registration period or invitation system?
  2. Is it related to Usenet indexers, trackers, or similar services?
  3. Is the opportunity currently active or upcoming?

Each analysis includes:

  • A relevance determination (true/false)
  • A confidence score (0-1)
  • A brief explanation of why the post is or isn't relevant

Keywords

The application also maintains a list of keywords for basic filtering before LLM analysis:

  • "open registration"
  • "registration open"
  • "signup"
  • "sign up"
  • "invite"
  • "invitation"

About

Python-based notification system for reddit posts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published