Prosthetic Conscience
Jason McBrayer's weblog; occasional personal notes and commentary
Mon, 18 Apr 2011
Instapaper client for Emacs
I’m a serious user of Instapaper, a web site that describes itself as “a simple tool to save web pages for reading later”. It’s rather more than that, though: it will also reformat pages for distraction-free reading, much like the now-defunct Readability bookmarklet, it works as a social bookmarking service (though I don’t really use this functionality), and it will bundle your pending reads into an ePub or Mobipocket ebooklet. There is an official freedom-hating iOS app, and several unofficial Android apps; the one I use is iPaper, which is still a little freedom-hating, but provides offline reading, which just using the website doesn’t, barring a strict ePub export/sync routine or some futzing around with wwwoffle or similar.
I use Instapaper to push articles that would otherwise cut into my productive time into my less productive time: adding them from my browser, syncing with iPaper once or twice a day, and reading mostly in the evenings. For saving articles, I mostly use the Firefox add-on Instaright, which is handy because I can add links without following them. Most of the articles I save for later come from Google Reader, which I use mainly from Firefox, so that works well. What didn’t work so well was my other main source of linkspam: identi.ca. I use identica-mode for my microblogging needs, so saving a link from identi.ca means a trip from emacs -> follow link to dent or site in Firefox -> Instaright. Obviously this is far too much opportunity to be tempted to read the article now rather than later, so I wrote an Instapaper client for Emacs.
The code is on bitbucket, and the instructions for using it are in the source header. It should be fairly self-explanatory. It saves URLs to your Instapaper account, and can get them either manually, by url-at-point, or, if you have w3m installed, from the current w3m page’s URL or selected link. It doesn’t provide any services for reading from Instapaper (offline or otherwise), and because of the terms of service on the official API and my lack of desire to do screen-scraping in Emacs Lisp, I don’t plan on adding any. A combination of w3m and wwwoffle or polipo is probably your best bet if you need to read Instapaper in Emacs.
Edited to add: Naturally, when I released this, it contained a significant bug, to whit: due to changes in url.el, it only worked in Emacs 24. This has been fixed, though if you byte-compile it under Emacs <= 23, you will get a compile warning.
[ Posted: 17:00] | [ Category: ] | Permalink | Comments: 3 ]
Powered by PyBlosxom
Subscribe