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.
-
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
-
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
- If using Gmail, you'll need to create an App Password:
-
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
-
Install dependencies:
pip install -r requirements.txt
-
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 IDREDDIT_CLIENT_SECRET
: Your Reddit app client secretREDDIT_USER_AGENT
: A unique identifier for your app (e.g., "usenet_monitor:v1.0")REDDIT_USERNAME
: Your Reddit usernameREDDIT_PASSWORD
: Your Reddit passwordEMAIL_SENDER
: Your email addressEMAIL_PASSWORD
: Your email password (or app password)EMAIL_RECIPIENT
: The email address to receive notificationsOPENAI_API_KEY
: Your OpenAI API key
- Copy
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
The application uses GPT-3.5-turbo to analyze posts based on the following criteria:
- Is the post announcing a new registration period or invitation system?
- Is it related to Usenet indexers, trackers, or similar services?
- 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
The application also maintains a list of keywords for basic filtering before LLM analysis:
- "open registration"
- "registration open"
- "signup"
- "sign up"
- "invite"
- "invitation"