Hacker News new | ask | show | jobs
by heyitsnick 5671 days ago
I do something similar with my Sony Reader; save to instapaper, instapaper to epub, epub to ereader. Obviously the book has to be hard-wired through USB for this to work, but then it also doesn't cost me anything.

It runs the epub through calibre convert, because the sony reader has issues sometimes with the instapaper epub file - the conversion fixes it (something to do with chapters over a certain length).

Through the evening, I instapaper save anything interesting to read, then just run this script each day before I leave the house.

This is the particularly rare-groovy batch code if anyone's interested.

@echo off

echo. Echo Creating cookie... echo. curl -c cookies.txt -d "username=youremail&password=yourpass" http://www.instapaper.com/user/login > temp.txt

echo. echo. echo Downloading epub... echo. curl -b cookies.txt -o C:\Users\Nick\Development\scripts\instapaperbad.epub http://www.instapaper.com/epub

echo. echo. echo Converting epub... echo. "C:\Program Files (x86)\Calibre2\ebook-convert.exe" C:\Users\Nick\Development\scripts\instapaperbad.epub C:\Users\Nick\Development\scripts\instapaper.epub

echo. echo. echo Copying file to device... echo. copy /Y C:\Users\Nick\Development\scripts\instapaper.epub F:\database\media\books

rem Cleanup. technically we can keep cookies and re-use. del temp.txt del C:\Users\Nick\Development\scripts\instapaperbad.epub del cookies.txt