---
title: Scripting Readability and Markdownify for clipping web pages
date: 2012-01-04 09:07
slug: scripting-readability-markdownify-for-clipping-web-pages
categories:
- Code
tags:
- markdown
- productivity
---

[read]: https://github.com/gfxmonk/python-readability/blob/master/README
[html2text]: http://www.aaronsw.com/2002/html2text/
[arc90]: http://lab.arc90.com/2009/03/02/readability/
[gnu]: https://github.com/aaronsw/html2text/blob/master/COPYING
[apache]: http://www.apache.org/licenses/LICENSE-2.0

<img src="/uploads/2012/01/read2textheader.jpg" alt="read2text header image" title="read2text header" width="650" height="165" class="aligncenter size-full wp-image-3526" />

I wanted to share a handy tool that I realized I use daily but rarely talk about. I call it Read2Text, but it's really just a Frankenstein script which combines [Python Readability][read] ([license][apache]) with [html2text][] ([license][gnu]). The combination allows you to grab web pages, process them with a port of [Arc90's Readability][arc90] and convert the HTML to Markdown, ready for pasting or piping to a text file.

[nvALT](http://brettterpstra.com/project/nvalt/) has this built in, but it's been a little crashy lately. I find it more reliable to just do this from the command line. If you install it in your path (both the `read2text` script and the "readability" folder), you can run `read2text http://brettterpstra.com/keybinding-madness/ | pbcopy`.

You'll get a Markdown-ified version of the page, with links, image links, headers, code blocks and text intact, but no comments, sidebars, ads, etc. It's not perfect, but it does a solid job and cleanup only takes me a minute, even on huge sites. I use this most of the time instead of clipping to Evernote these days.

I alias it in my .bash_profile to `rtt`, and often redirect the output straight to a text file in my nvALT folder: `rtt http://grml.org/zsh/zsh-lovers.html > ~/Dropbox/Notes/nvALT2.1/zsh\ lovers.md`

Now I have a new note that automatically shows up in nvALT with the text of the zsh-lovers page (yeah, I tried switching to zsh this morning. I'll have to come back to that). Anyway, I thought others might find this hack of use, so I'm making the download available below.

**[Download Gather CLI v2.1.12](https://brettterpstra.com/downloads/gather-cli-2.1.12.pkg)**

A Frankenstinian combination of html2text and Arc90 Readability. This command line tool makes clipping web pages into Markdown text without ads and comments simple.

[More info](https://brettterpstra.com/projects/gather-cli)

By the way, I also have [a web service](http://markdownrules.com/) for this. You can get [raw markdown](http://fuckyeahmarkdown.com/go/?u=http%3A%2F%2Fbrettterpstra.com%2Fscripting-readability-markdownify-for-clipping-web-pages%2F&read=1) or a [nice interface](http://fuckyeahmarkdown.com/go/?read=1&showframe=1&u=http%3A%2F%2Fbrettterpstra.com%2Fscripting-readability-markdownify-for-clipping-web-pages%2F) for previewing and copying. There's also an API and bookmarklets for integration into your favorite browser. Have fun!

[Your support is greatly appreciated!](https://brettterpstra.com/donate/?ppid=A9KK2MTU7QSJU)

---

Brett is a writer and developer living in Minnesota, USA. You can follow him as ttscoff. This content is supported by readers like you. [More about Brett](https://brettterpstra.com/contact.md), including social links.

Copyright © 2026 Brett Terpstra. All rights reserved.
