Inspiration

I wanted to do something that would relieve a bit of my stress as a college student. I've found myself scrolling through reddit memes to relax recently, and I thought it would be nice to automate that in some way. Inspired by daily digests I get from the NY Times, I went to code something to send me fun memes to look at every day.

What it does

The script will scroll through the top images of a subreddit in order of reddit's "hot" filter order and take the top images to email to the user.

How we built it

The script uses 3 external libraries to accomplish this task: praw (reddit's public API) is used to get information about top posts and their contents. Requests API is used to convert the image sources from reddit to base64 so it can be sent in an email. smptlib was used to actually send the email, which was built up using python's built in MIME functionality.

Challenges we ran into

A big challenge was deciding what libraries/languages to use for the project, since webscraping and emailing is not language specific. After deciding on python, I also had to contend with learning how sending emails from a script works, as well as how attatchments and image sources should be handled. It's a lot of things I've never done before and have no background in, so it was challenging to learn so much in such a short time.

Accomplishments that we're proud of

I'm proud that I got a working product that I would actually enjoy using outside of this hackathon weekend. As a programmer under a time crunch it is hard to come up with a feasable project idea that actually serves some use. I also have never learned so many different public APIs/libraries in such a short time before, so I'm proud that I managed to navigate through them all and use them properly.

What we learned

I learned a lot about how email protocols and image processing work. I also got a lot more experience using external libraries in python since it's not my main programming language.

What's next for Daily Dose of Reddit

I'm hoping to set up this python script to windows scheduler to run daily and send me digests in the future. I'd also look at making it more versitile, letting gifs/less common image extensions be added to the emails.

Built With

Share this project:

Updates