Newsprint: Turning e-mail newsletters into a personal PDF

I really enjoy reading e-mail newsletters. They’re clever, informative, and funny, and provide me with lots of food for thought — as well as professional information that is crucial to my work.

The thing is, I don’t have time to read them during the week. And on Saturday, when I do have time, I don’t use my computer. So I have a funny way of reading them:

  1. When a newsletter arrives, a filter automatically moves it into my “toprint” folder.
  2. My very favorite newsletters are not only moved into “toprint”, but also get stars.
  3. On Friday afternoon, I go to my “toprint” folder, scoop up all of the starred newsletters, and print them out — 4 pages/side, and double sided. I then choose a number of the unstarred newsletters, and print them, too.
  4. Saturday morning, I get up super early (typically about 4:30 a.m.) and spend several hours reading through what I collected during the week.

I’ve been doing this for a few years, and like this system. But I don’t relish the idea of using so much paper, and I increasingly saw examples of a page that didn’t have to be printed, because it contained nothing more than the newsletter’s subscription information or self promotion. No reason to keep or print that. Plus, I don’t need all of the promotional images. Plus, sometimes my computer (or I) will fail to print the articles 4x/page, and the results are quite annoying.

Also? Why am I spending so much time on this, going through each message and printing it? Can’t my computer grab all of the starred messages and print them?

That was the genesis of newsprint, a new Python package that does all of this for me:

  • I run newsprint from the command line. It takes all of the starred messages in my toprint folder, and creates a PDF file from them, 4 pages/side.
  • Along the way, it strips out all of the promotional, subscribe/unsubscribe stuff.
  • It removes images, unless it thinks that the images are useful and pertinent to the story. And if the image is very dark (like a dark-mode data plot), it reverses the colors.
  • It puts footers at the bottom of each cell, indicating what newsletter this is and what page we’re on for that newsletter, as well as the overall newsletter.
  • It creates a table of contents
  • With a Claude API key, it’ll summarize the entire set of newsletters, telling you what topics appeared across all of them
  • You can optionally ask for Claude to create a second, personal summary page. For example, I ask it to tell me if there are any topics with public data sets that might be appropriate for my Bamboo Weekly newsletter.
  • You can choose from the unstarred messages in your inbox, and have them added to the PDF output.
  • You can choose different paper sizes and orientation.
  • Starred messages are deleted (“retired” in the package’s language) after they have been put into a newsletter. But they’re also recorded — so if you made a mistake, you can unretire them
  • Everything is configurable from the command line and via a config file. Run newsprint –setup to create the config file for the first time.

Newsprint has already saved me lots of time and paper, and makes my Saturday-morning reading more enjoyable. I’m still iterating and improving on it; if you have suggestions, please send them my way!

Meanwhile, check it out on PyPI: https://pypi.org/project/newsprint/