The inspiration behind this project came from Show Your Work! by Austin Kleon, in which he offers an uncommon piece of advice: read obituaries. He noticed that artists who had near-death experiences often treated every new day with greater motivation and gratefulness. They treated each new day as if it were their last because, from experience, they knew very well that it could be true. In order to simulate the same feeling, (without the near-death experience) Mr. Kleon started reading obituaries. Reading obituaries may sound like a sordid affair but we've found that they've made us more grateful and more inspired after reading the accomplishments of great people. And as any hacker worth their salt would do, we were lazy and wanted to automate the process!

What it does

Obite is a mail bot/utility that scrapes the obituary sections of the NY Times, Chicago Tribune, and LA Times. It then parses that data and formats it into a stylized email which is scheduled to be sent every morning at 8 AM. Now instead of going to all of these different websites to read obituaries, we can get everything in one place: our inbox, which we check every morning anyway.

How we built it

There are three parts to this project, the scraping, the parsing/formatting, and the scheduler. For the scraping, we used Python with the BeautifulSoup4, and Requests libraries. This grabs the raw data from the news websites. The raw data is then summarized using the sumy library and saved as a JSON file. For the parsing/formatting component, we used Javascript, specifically the nodemailer package to send emails. Nodemailer requires an email to be specified, and since we mainly made this for ourselves, we created a configuration setup file that takes in our emails and uses our emails to send ourselves the digest of obituaries. Finally, the scheduling is done using Windows 10 Task Scheduler, which runs the run.bat file that runs the python and javascript files.

Challenges we ran into

We had some difficulty getting the bot to properly format an email because according to Gmail Developers, we needed to embed HTML with inline CSS, a task every front-end developer is averse to. Other than that, there wasn't much we struggled with. We did have a big argument over the logo because we wanted two different designs, but we ended up with the current design, which we're both happy with.

Accomplishments that we're proud of

We're glad that we made something we'd use every day outside of the hackathon. We're also proud of the minimal design that we chose for the bot. We specifically chose not to have bright and happy colors as that would conflict with the obituaries, which are notably depressing.

What we learned

We learned about how newsletters in your inbox are formatted and processed by Gmail and how to recreate them from scratch as well as figure out how to send an email automatically using NodeJS and Python.

What's next for Obite

We were thinking of expanding the collection to more newspapers across the country and create a front-end web application that allows you to choose which newspapers you want to read from. We were also thinking of auto-tagging these obituaries by profession so that you can also preference what kind of people you want to read about, e.g. engineers, artists, writers, etc.

Share this project: