background preloader

Marky - The Markdownifier by Brett

Facebook Twitter

Read2text - Marky on shell CLI

Marky the Markdownifier, reintroductions. I’ve been working a bit on Marky the Markdownifier. It’s a project I started back in 2010 and use regularly, but it’s never really caught on with the Markdown masses. I’ve tweaked the algorithms and added to the API to make Marky as useful as possible within my own workflow, and hopefully within other’s as well. At its most simple, Marky takes urls and converts them to Markdown text, removing comments and ads in the process.

A web-based version of read2text. In the web interface, you can copy Markdown to the clipboard, preview it as HTML and a few other surface level tasks. You can also go straight to HTML view and use Marky as an Instapaper Mobilizer kind of tool. Starting with Bookmarklets for your browser, you can convert the current page to raw Markdown, open it as a preview, even save it directly to nvALT. Everything is done with GET or POST requests to /go/ on your chosen domain. Here are a couple of Bash functions I use for clipping from the command line: Marky Services v1.0. More Marky love for nvALT. I’ve added a couple of new API parameters to Marky to allow better nvALT clipping of web pages. First, if you’re not using the nvALT 2.2 beta, the url handler is “nvalt” instead of “nv”. Now you can specify an output type of “nvalt” instead of “nv” and get the right handler returned. I’d recommend, of course, just using the beta. It’s stable and happy. Second, I added the ability to send a “tags” parameter.

Add a url encoded string of space or comma-separated tags and it will add them to the returned url. If the “opennv” parameter is 1, the preview window will launch the URL automatically. The new parameters are documented in the API section under the Marky input form. I also added a ready-to-go bookmarklet for the tags feature to Marky’s page. Experiment: Send to nvALT links. Marky the Markdownifier, reworked and refined.

Marky the Markdownifier, my web tool that extracts web articles and converts them to Markdown, has received an update that resolves quite a few standing issues. It’s a major update and partial rewrite, so there may still be some bugs. Please feel free to drop me a line on Twitter or contact me directly if you run into problems. The biggest changes are that the “readability” functions that strip ads, menus, comments, etc. out of the post are now handled by an updated version of PHP Readability, and the “markdownifying” part is handled by html2text instead of PHP Markdown Extra. The previews are also rendered by MultiMarkdown 4 now.

The most obvious improvement in all of this is that if a post contains images within links (i.e. hyperlinked images), it won’t throw off the reference counter for the links. Previously, this circumstance pretty much entirely broke the output. There are still some edge cases that are breaking it, but I’m narrowing them down one at a time. MultiMarkdown upgrades for Marky the Markdownifier. I’ve updated Marky the Markdownifier with a few key fixes and improvements. It’s getting more and more traffic and has some dedicated users, so it seemed like it was about time to solve some of the more annoying issues. It still needs a usability overhaul and some kind of iOS solution, but these issues were the ones that bothered me the most. Marky now: I have a very basic parser written for converting HTML tables to MMD format, but it chokes on more complex and nested tables, so it’s not live yet. It’s something I would really like to have, though, so I’ll try to wrap that up. marky.rb needs an update, too… Lastly, I’ve given the styling a small kick in the pants.

I’ve started playing with mobile solutions. There’s no elegant way I can find to get your Markdown to your clipboard, or even programtically select text for copying in iOS 7. As an aside, there’s an in-flux Reader-only version that uses the same back end. This was really, really bugging me. Heck Yes Markdown. Markdownrules.