Giter VIP home page Giter VIP logo

venturafranklin / reddit-dailyemaildigest-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ni5arga/reddit-dailydigest-bot

0.0 0.0 0.0 40 KB

Reddit Daily Email Digest Bot is a Python-based bot that automates the compilation of top posts from specified subreddits into a daily email digest. Users can customize sorting methods, time ranges, and the email. The bot simplifies the process of staying updated on favorite subreddits by delivering a formatted summary.

Python 100.00%

reddit-dailyemaildigest-bot's Introduction

Reddit Daily Email Digest Bot

This project was forked off in order to send emails instead of posting to a subreddit.

This was created in order to eliminate the need for IFTTT Reddit Digest

Reddit Daily Email Digest Bot is a Python bot designed to simplify the process of aggregating and sharing top posts from your favorite subreddits. It fetches the top posts from specified subreddits, compiles them into a neatly formatted daily digest, and automatically emails the digest to an email

Key Features

  • Can create daily digest of top posts from multiple subreddits.
  • Fetch top posts from multiple subreddits in the time frame you want.
  • Compile the fetched posts into a digest with post details.
  • Email the digest to a designated email using mailjet.

Getting Started

Prerequisites

You'll need to have the following installed on your system:

  • Python 3.x

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/VenturaFranklin/Reddit-DailyEmailDigest-Bot
  2. Change the project directory

    cd reddit-dailydigest-bot
  3. Install Dependencies

     pip install -r requirements.txt

Configuration

Reddit API Credentials

Rename the .env.example file to .env and add your Reddit and Mailjet API credentials.

Subreddits

Modify the SUBREDDITS variable in config.py to specify the subreddits from which you want to fetch posts. Don't include r/ before the name of the subreddit.

SUBREDDITS = ['science', 'technology', 'maths', 'physics']

Usage

After configuring it properly simply run the bot script :

Daily Digest Script

python main.py

The bot will fetch that day's top posts from the specified subreddits, compile them into a daily digest, and email it to the configured email.

Auto-running the script for the daily digest

To make your Reddit Daily Digest Bot run automatically every 24 hours, you can use a scheduler like cron (on Unix-like systems) or Task Scheduler (on Windows). Here's how you can set up the automatic scheduling :

Automate Script Execution Every 24 Hours

  1. Linux/macOS (Using cron):

    • Open your terminal.

    • Open your crontab file for editing by running:

      crontab -e
    • Add the following line to schedule your script to run every 24 hours:

      0 0 * * * /usr/bin/python3 /path/to/your/reddit-dailydigest-bot/main.py
    • Save the file and exit.

  2. Windows (Using Task Scheduler):

    • Open the "Task Scheduler" application.
    • In the right-hand pane, click on "Create Basic Task...".
    • Follow the wizard to create a basic task, specifying the task name and description.
    • Choose "Daily" and set the recurrence to "1 days".
    • Specify the start date and time.
    • Choose "Start a program" and browse to the location of your Python executable (e.g., C:\Python39\python.exe).
    • In the "Add arguments" field, provide the full path to your main.py script (e.g., C:\path\to\your\reddit-dailydigest-bot\main.py).
    • Complete the wizard, review your settings, and click "Finish" to create the scheduled task.

Ensure Proper Environment Setup

Make sure that your Python environment and working directory are properly set within your script to avoid any issues when it runs as a scheduled task.

Testing and Troubleshooting

Before scheduling the script to run automatically, test it manually to ensure it works as expected. Check the logs or output to identify and fix any issues.

Contributing

Contributions are welcome! If you'd like to contribute to this project, please open an issue or submit a pull request.

reddit-dailyemaildigest-bot's People

Contributors

ni5arga avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.