Skip to content
dozens edited this page Oct 3, 2024 · 13 revisions

Books 📚

On collecting, organizing, converting, obtaining books. Not book discussion of any sort. Use goodreads for that.

Organizing

  • Calibre - useful with DRM removal plugin. Possibly the best and most used used single piece of open source software that I use. I should really contribute some time or money 🤔

How to get free books

in order of increasing sketchiness:

  1. Your public library - not sketchy and totally awesome! (overdrive.com, worldcat.org)

  2. gutenberg and openlibrary

  3. mobilism or z-lib

  4. textbooks from springer library genesis upenn online books

  5. Buy it, you cheapskate

Converting and creating ebooks

Optimizing content and changing format.

Creating epubs

use sigil.

Creating cbzs

cbzs are comic book files. They are just zipped directories of images. You can download a bunch of jpgs and simply zip comic.cbz ./*.jpg. Or zip them some other way and rename the file.

I read cbzs in YACReader on my macbook, on Perfect Viewer on my Android tablet, and on Chunky on my iPad. Getting comics onto my Android tablet usually involves Airdroid, but getting comics onto my iPad is super easy thanks to AirDrop.

Note: I have used curl to scrape webcomic sites and bundle them up like this

Converting PDF to epub

You will need:

  • sigil
  • tesseract ocr
  • imagemagick
  • a text editor

I found a high quality PDF scan of a book (Yoga Nidra) on Gutenberg. Using the process below, I reduced the file size from +80mb to ~3mb, making transferring it to a kindle more possible.

  1. Find some way to export the pages of the PDF to images. One way to do this is to use Calibre to convert the PDF to an epub. This will save each page as a jpeg in the resulting .epub. Update: try imagemagick instead: convert book.pdf pages.png
  2. Convert the images to large .tiffs for ocr-ing: for img in *.jpg; do convert ${img} -resize 400% -type Grayscale tiff/${img%.jpg}.tif; done (requires imagemagick)
  3. Convert the images to text: for img in *.tif; do tesseract -l eng ${img} output/${img%.tif}; done (requires tesseract)
  4. During post-processing, convert ligatures like fi and fl to fi and fl respectively.
  5. Use Sigil to construct a new epub using the extracted text, adding formatting and generating a TOC, adding images back in as necessary.

Converting epub to audio

  1. Use Calibre to convert the epub to a txt file.

  2. say -v <voice> -r 300 -f <in.txt> -o out.aiff --progress. say -v '?' for a list of voices.

    • say -v ? to see installed voices. say -v ? | grep en_US for US English voices. say -v ? | grep es_MX for Mexican Spanish voices. Browse and install new voices in the Speech pref pane.
    • -v Alex - I like "Alex" because he breathes between sentences and paragraphs, and sounds a little more natural.
    • -r 300 - a "rate" of 300 words per minute. Pretty close to how fast I like my audiobooks, and makes for a smaller file size.
  3. (optional?) convert aiff to mp3. Options:

    1. with ffmpeg. ffmpeg -i in.aiff -ar 44100 -ac 1 -ab 48k out.mp3. This is faster than VLC?
    2. with VLC. (I'm using an audiobook app that only supports mp3. If you have no such restriction, you can convert to speex, etc.) For speech, the following mp3 preset seems to sound fine while producing a much smaller file size: 48kbps, 44.1khz, mono-channel.
  4. (optional) Split up your mp3 into segments: ffmpeg -i file.mp3 -f segment -segment_time 3600 -c copy out%03d.mp3

    • -segment_time 3600 is the segment length in seconds. (3600 seconds = 60
      • 60 = 1hr)
    • out%03d.mp3 will write each segment as out000.mp3, out001.mp3, ... out00n.mp3.

Audiobooks

I used to use MP3 Audiobook Player to play audiobooks on my iphone for the following reasons:

  1. Good speed controls
  2. easy FTP host/browser transfer.

But then it stopped working: all the audio started sounding tinny and staticy whenever I tried to adjust the playback speed, and the maintainer never responded to any bug tickets I submitted.

So now I use bookplayer. It supports even easier transfers via AirDrop.

Update 2024: back to MP3 Audiobook Player

Remaining challenges:

  1. how to bookmark, extract content for notes.

DRM

To bypass Overdrive DRM in library books, simply copy the contents of My Media\My Audiobooks somewhere else

Resources / Further Reading

Graph

Which books lead to reading which other books?

This is something I don't really keep up with, but I'm curious about which books lead to which other books.

  • American Heiress, Jeffrey Toobin
    • Blood in My Eye, George Jackson
  • Delivering Happiness
    • Tribal Leadership
    • Good to Great
      • Built to Last
  • Between the World and Me
    • The Hate U Give
    • White Trash
    • Hitler's American Model
    • Stamped from the Beginning
  • Hunger. Roxane Gay
  • Why Buddhism is True
    • Mindfulness, Joseph Goldstein
  • Mastering the Core Teachings of the Buddha
    • For a Future to be Possible, Thich Nhat Hanh
    • A Heart as Wide as the World, Sharon Salzburg
    • The Revolutionary Art of Happiness, Sharon Salzburg
    • Light on Enlightenment, Christopher Titmuss
    • A Path With Heart, Jack Kornfield
  • What Happened, Hilary Clinton
    • On Tyranny
    • The Assault on Reason, Al Gore
    • The True Believer, Eric Hoffer
  • My Life On The Road, Gloria Steinem
    • Soul On Ice, Eldridge Cleaver
    • Mankiller: a chief and her people, Wilma Mankiller
    • Outrageous Acts and Everyday Rebellions, Gloria Steinem
  • Born to Run
    • Born on the 4th of July
    • People's History of the United States
    • Woody Guthrie: A Life, Joe Klein
    • A pocket history of the United States, Henry Steel Commager
  • Radical Candor
    • Competing on the Edge: Strategy as Structured Chaos, Shona Brown
    • The Happiness Project, Gretchen Rubin
  • We Are Indivisible
    • Listen Liberal
    • How Democracies Die
  • Providence, Alan Moore
    • The King in Yellow
Clone this wiki locally