Projects

daily-stoic

2024ReactPython

A weekend project. I'd enjoyed reading The Daily Stoic the year before and was surprised no one had built a site for it yet — one page per day, served on the day it's meant to be read.

The Daily Stoic site showing a day's entry

How it was built

I converted the book's epub into a zip file, extracted it, and was left with XHTML markup for each page. From there I used Beautiful Soup to parse every page into markdown, then packaged the result into a small React app that shows today's entry based on the date.

Parsing issues

362 of 366 pages parsed cleanly. The remaining 4 had unique class names in their HTML that didn't fit the general parsing rule — rather than write special-case code for four pages, I just hand-wrote their markdown directly.