Save books out of Safari Books Online
This is hard. I spent way too much time figuring this out, because I was annoyed that a book I bought (Addison-Wesley) was available online for free, except only for 45 days after which payment was required. So I made this hack... probably useful to no one else, but here it is.
- Safari To Go (the Safari Books Online iPad app).
- a Mac (could be done on a PC, but you'd have to tweak the php script).
First, get Safari To Go on your iPad. Log in, and add all books you want to download to your "Offline Bookbag" (hint: tap the heart when viewing a book).
Now go get iPhone Explorer. This allows you to pull files off your iPad. You'll need to grab the Safari.sqlite file from
/<your ipad>/Apps/Safari To Go/Documents/Safari.sqlite
You also need to grab the images for each individual book. They're in
/<your ipad>/Apps/Safari To Go/Documents/<some long number>-plain-folder/
Grab the folder called "images" for each book you're saving.
Now download this php script I wrote, which extracts all the offline books from the "Safari.sqlite" file. Place it in the same folder, and run it from the terminal (hint:
cd ~/Desktop/ and then
php safariparse.php will run it if it's on your desktop).
You should now have a number of folders for each of the books you've extracted. Hooray. Now comes the manual step. You have to manually match up the image folder with the right html files. It's not too hard, as I've added a hint folder to each of the book folders. You should see something like
your-book-title/images/<some long number>. Find the matching image folder from the iPhone Explorer step earlier, and place so graphics are at the path
your-book-name/images/<some long number>/graphics/01_01.jpg where the html can find it.
You now have an offline backup of any Safari Books Online book you own on your Mac. Win.