Waking up sucks. One second you’re prancing through a field of flowers in a dream, and then the next second a harsh alarm clock is suckerpunching you into dim reality. “What if I could make this process more enjoyable?” I once foolishly asked myself.

My first solution was to set my alarm clock to play a song I really enjoyed every morning. The problem with that, of course, was that I didn’t enjoy that song for very long. So I thought that perhaps I could write some software that would improve the whole waking-up process. What I came up with wasn’t more pleasant, but at the very least it was slightly more useful.

I used this as an opportunity to play with a couple of things that I hadn’t really worked with much at the time. I was pretty comfortable with writing little scripts in python, but I wanted to see what it was like to make a GUI using tkinter. And I had played a little bit with grabbing info from websites via scraping or public APIs, but I wanted to get more comfortable with it. So I built a little application that could pull information from a few different places and then robotically recite it to you every morning.

WakeUp! GUI

The GUI I slapped together

Features of WakeUp!:

  • Schedule a time for your computer to greet you, with any of the optional features below
  • Text-to-speech voice synthesis using the pyttsx3 library in order to relay various pieces of information pulled from different sources
  • Plays a user-selected song using pydub (defaults to an annoying bugle tune)
  • Pulls data from Google’s APIs to announce how many unread emails you have (in Gmail) and what events you have coming up in the next few days (according to your Google calendar)
  • Pulls data from Facebook’s API to announce how many Facebook notifications you have
  • Pulls data from weather.com via the pywapi library (temperature, likelihood of precipitation, and time the sun will set)
  • Pulls data from Any.do using gvkalra’s python-anydo library to announce what tasks you have queued up for the day
  • Uses BeautifulSoup to scrape the Poetry Foundation and Poets.org for their poem of the day and reads them aloud

Warning: I haven’t looked at this code in several years, so it probably does not function correctly due to changes in APIs and scraped website layouts. It’s also missing a requirements file. Sorry!