The cover of my compiled eBook.

Weekly Suttas: A Buddhist eBook

Learn how to validate eBook files.

2023-04-21T13:54-07:00

Download this eBook.

My favorite part of the San Francisco Public Library is its sprawling top floor and glass roof. When I lived in the city I would stop at the lower levels to grab some books on Eastern philosophy, usually Buddhist or Taoists texts, and then I would make my way up the elevator and into the sunlit reading room.

On lucky days when the same old man wasn't sitting in his favorite chair and blurting out obscenities every three minutes, I could sit quietly in this communal space and study Asia's famous philosophers. The books I read were great resources for beginners, but the more contemporary writers would often reference other texts that I could only find online in eBook or PDF form.

For example, Thich Nhat Hanh's book The Heart of the Buddha's Teaching recommends three supplemental texts to read weekly for a better understanding of Buddhism. I thought, "wouldn't it be great to compile and cross-reference these three texts in an eBook that's free for anyone?" So that's exactly what I did.

There is something I learned in the process: eBooks, for the most part, are relatively simple HTML files with a little XML thrown in to structure the table of contents. Zip it all up in a new file, change the extension to .epub and it's good to go, that is if the code is error-free. I used a command-line code checker to make sure there were no missing characters before zipping it all together.

To make sure an eBook will open on any reader, here are some quick steps for validation with epubcheck:

:: install epubcheck
curl -SL https://github.com/w3c/epubcheck/releases/download/v4.2.6/epubcheck-4.2.6.zip | tar -xf -
:: open downloaded folder
cd epubcheck-4.2.6
:: check installation and version
java -jar epubcheck.jar --version
:: check file
epubcheck publication.epub

Thanks to this command-line tool I was able to produce a digital volume that I'm proud of – something that's available far beyond the walls of the San Francisco Public Library. I hope you enjoy it also, and please share it with anyone who might be interested. You can send this url for a direct download:

https://fern.haus/Weekly Suttas, Vol 1.epub