Ryne Andal

35 year old Software Developer, Husband, Father.

Maiden Voyage into TIL Posts

This is my attempt to force myself to write about something I learn each day. Inspired by this post by Addy Osmani, I believe this will help with one of the things I’ve always struggled with since my car accident in high school – retaining knowledge. While my “Second Brain” (see Building a Second Brain by Tiago Forte) minimizes the impact this has on my life, I do think practical exercises can help me retain knowledge and hopefully build out some neural connections to strengthen my memory. Without further adieu, here’s my TIL:

EPUB Files can be unpacked via unzip

For this example, I’ll be using the excellent “Meditations” by Marcus Aurelius, freely available on Project Gutenberg and my personal favorite source for copyright-free classics, Standard Ebooks.

Termiinal window showing epub file

Once you have an epub file locally, simply running unzip on the file will unpack the EPUB container:

Terminal showing EPUB being unpacked via unzip command

I stumbled upon this when looking at the official W3 EPUB file spec, curious about how file conversions from PDF → EPUB and vice-versa. The most relevant tidbit here is the following, emphasis mine:

The OCF Container is packaged into a physical single ZIP file containing:

  • Mime Type file: application/epub+zip.
  • META-INF folder (container file which points to the location of the .opf file), signatures, encryption, rights, are xml files
  • OEBPS folder stores the book content .(opf, ncx, html, svg, png, css, etc. files)

Other interesting tidbits regarding my interest in file conversions is that styling and content is done via HTML and CSS within the document, making conversions to other document formats absolutely trivial. EPUB3 has HTML5 support for MathML, HTML5 Video, better font support, and improved accessibility functionality like text-to-speech. I think it could be fun to have optional embedded video in some books, perhaps in textbooks or other learning material.