Shelter-in-Place Journal, Day 284

I woke up today realizing that I had two problems that I could solve if I just spent a little time learning how to make images in Python:

  • Creating a graphic for the daily Pushover weather notification that I send to Diane and me; right now, it’s just plain text and it’s difficult to pick out the important information. Pushover doesn’t support HTML or formatted text, but it does allow adding an image to the notification.
  • Printing labels on the Brother PT-2730 on Big Sur, as I mentioned yesterday.

The second problem was smaller, so I attacked it first. It was easy to create a PNG file from the text for a label and print it; the hard part was figuring out how to print it to a label of the proper length, and the documentation is, shall we say, very limited. Trial-and-error was my friend.

A few dozen trials, and most of my tape supply, later, I have a working program that lets me print labels in any font on my machine (figuring out how to specify the font by name and variation instead of filename and index was not easy). It’s on GitHub in case it’s of use to anyone else.

Creating the graphic for the weather notification will happen some other time.

Shabbat Shalom!