Generating Images with Tao Te Ching Quotes
Automated infodumping
I really enjoy the fact that Tao Te Ching by Lao Tzu exists. The first translation I have ever read was Carol Deppe's. It's simple, made with some artistic liberty to read more easily, so it was a great intro.
I wanted to infodump about it to snow but that's a lot of content to speak or type, even for me. But she did some computer magic to a kindle and exposed http://kindle.sn0w.cx/data
which accepts image data in POST
requests and displays them on that kindle (somewhere in her house).
Then I found out about this beautiful font Compass by somepx.
And now I connected those two dots into the inspiration for this quick project.
So I wrote code that generates images with Tao Te Ching quotes using this font and displays them one by one every 3 days on snow's kindle :3
The code
Here's the git repo: tao_quote_display
This is very spaghetti code - don't use it as a good example of programatic image generation. I was writing it as I was experimenting and silly reasons don't justify refactoring time. It works!
The code runs every day but it only generates and sends an image every 3 days. It takes the next quote that it hasn't shown yet, finds the right font size and line breaks in a very inefficient way, adds the attribution for the translator of the book and the font author, and POST
s it to snow's kindle.
Result
Now all my infodumping about Tao Te Ching will happen automatically! It will happen over *quick math* about a year (107 quotes, once every 3 days).
I love the old-school fantasy look of the text and I find it satisfying that it displays literal ancient wisdom.