Skip to content

alexisbouchez/dailydoseofmemes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Daily Dose of Memes

"Ten memes a day keeps the doctor away." Dr. Runtime Exception, Chief of Memedicine

A beautifully crafted Go application that delivers the top 10 memes from r/programmerhumor straight to your inbox every day.

Features

  • 🎭 Fetches the top 10 memes from r/programmerhumor
  • 📧 Delivers them in a beautifully formatted HTML email
  • 🚀 Fast and efficient Go implementation
  • 🔒 Uses environment variables for configuration

Requirements

  • Go 1.24 or higher
  • Resend account for email delivery
  • Internet connection to fetch memes from Reddit

Getting Started

  1. Clone this repository:

    git clone https://github.com/alexisbouchez/dailydoseofmemes.git
    cd dailydoseofmemes
  2. Set up environment variables:

    export RESEND_API_KEY=your_resend_api_key
    export RECIPIENT_EMAIL=your_email@example.com
    export SENDER_EMAIL=memes@yourdomain.com
  3. Build the application:

    go build -o meme-mailer
  4. Run it:

    ./meme-mailer

Setting Up as a Daily Service

Using Cron (Linux/MacOS)

Add a line to your crontab to run the application daily:

# Edit your crontab
crontab -e

# Add this line to run it every day at 9 AM
0 9 * * * cd /path/to/dailydoseofmemes && RESEND_API_KEY=your_key RECIPIENT_EMAIL=your@email.com SENDER_EMAIL=memes@yourdomain.com ./meme-mailer

Using Task Scheduler (Windows)

  1. Create a batch file (run_memes.bat) with:

    @echo off
    cd C:\path\to\dailydoseofmemes
    set RESEND_API_KEY=your_key
    set RECIPIENT_EMAIL=your@email.com
    set SENDER_EMAIL=memes@yourdomain.com
    meme-mailer.exe
  2. Set up a task in Windows Task Scheduler to run this batch file daily.

Architecture

The application consists of three main components:

  1. Scraper (scraper/reddit.go): Handles fetching memes from Reddit
  2. Mailer (mailer/resend.go): Manages email formatting and sending via Resend
  3. Main (main.go): Coordinates the overall process

License

MIT

Acknowledgements

  • Resend for their amazing email API
  • Reddit and the r/programmerhumor community for the endless memes

About

Ten memes a day keeps the doctor away.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages