github soundcloud rss
going on a safari
Dec 18, 2017
4 minutes read

If you are working with computing and don’t have access to Safari Books Online, you are probably not going as fast as you can.

If you subscribe, you should change some habits.

  • Prefer it over Googling
  • Prefer it over StackOverflow and howdoi
  • Combine books with video courses
  • Search for libraries in (ie. pandas, urllib, argparse or logging) to see how professionals use them
  • Highlight and export your highlights
  • Work with your highlights in a Jupyter notebook and ultimately upload the notebooks to GitHub

There’s video courses. I always seem to understand the text better after I’ve seen a demonstration.

What’s a safari, anyway?

from Arabic safara “to travel”


You can export your notes to a CSV file. A fun and easy way to browse a CSV file is to use xsv and fzf:

xsv table safari-annotations-export.csv | fzf

You can use something like browsercookie to help you download the CSV automatically:

from clint.textui import progress, puts
import blindspin
import browsercookie
import requests

jar = browsercookie.firefox()
url = ''

puts('\nWaiting for download to begin... (may take a while)')

with blindspin.spinner():
    r = requests.get(url, stream=True, cookies=jar)

total_size = int(r.headers.get('content-length', 0))

filename = 'safari.csv'

with open(filename, 'wb') as out_file:

    for chunk in, expected_size=(total_size/1024) + 1): 
        if chunk:

puts(f'File saved to {filename}\n')

Maybe put this thing in a pex and run it in a cron job once in a while and send a push notification with ntfy just because you can.

safari.pex && ntfy send 'Downloaded Safari highlights CSV!'

Working with CSV data? My favourite tools are tad, xsv, csvkit, Pandas and SQLite.


Here are some of my favourite Python resources. If you check these out, you will end up writing beautiful Python code.

Raymond Hettinger

Brett Slatkin

Luciano Ramalho

Kenneth Reitz

Kenneth Reitz’ blog.

Kenneth Reitz wrote Requests and creates APIs for humans. README driven development.

Miguel Grinberg

Miguel Grinberg’s blog.

William Wesley McKinney

William Wesley McKinney is one of the creators of Pandas. Here is his blog.

Mahmoud Hashemi

Author of boltons and a very cool logging framework - lithoxyl. Logs are not cool.

Harry J.W. Percival


More specific:


If man is getting you down, try a book instead. Soak in some extra knowledge. Then read the ArchWiki.

Programming philosophy

Operations and monitoring



Perhaps an open source HTML epub reader? You miss out on the discoverability though.

Let me know if you have any suggestions or have done something similar.


It’s in your browser. That’s also a downside. The browser becomes a better source of knowledge.


O’Reilly can data mine everything you read.

Back to posts

comments powered by Disqus