CCATP #419 Bart Busschots Pretty Markdown & HTML Links with TextExpander & Perl

Bart likes to give credit to the sites he references in his shownotes but the links get fairly clutterly. He wrote a very short (17 line) perl script and put it inside TextExpander to make pretty links instead. He wrote this for Markdown but since I like html better he created a version for html as well. He walks us through his detailed tutorial here: www.bartbusschots.ie/…. Then he tries to convince me that Markdown is awesome and html is dreadful. Listen along to see if he succeeds.

I mentioned an video tutorial series created by Richard Baker on TextExpander. Here’s a link to the one he did on embedding scripts into TextExpander: www.youtube.com/…


itunes
mp3 download

What's the Point of Markdown?

Markdown is a text markup language invented by John Gruber, who wrote it for the best geek reason of all – to scratch his own itch. He found HTML markup too distracting while composing blog posts and articles, so he wanted a format he could use to markup his text that was non-intrusive, but could be automatically converted to HTML for publishing.

Markdown is designed to look like plain text, and that's what makes it so cool. If you sent someone a markdown document as a .txt file, they could read it perfectly, and would probably never even guess that it was a marked up document. They would intuitively see lines starting with stars as bullet points, short strings starting with hash symbols as headers, and words surrounded by stars as emphasised in some way.

I compose a lot of my blog posts and show notes for various podcasts in Markdown. My readers and listeners have no idea that I do that, because the format you write in does not have to be the format you publish in. All my posts and notes end up published in HTML, but many of them get written in Markdown.

Key Points:

  • Markdown is much less distracting than HTML, so it stays out of your way better while writing
  • Markdown can be read by anyone – no prior knowledge required!
  • Markdown can be automatically converted to HTML, so no effort involved in getting from Markdown to the final output format I need
  • Markdown files cannot become obsolete. Unlike old Windows Write of Claris Works files, markdown files will always be readable – they are just text!

Allison’s Rebuttal

  • Markdown doesn’t support “target=_blank” that we just learned about which keeps the viewer on the same page and opens link in a new tab/page
  • Markdown is harder for me to remember
    • The asterisk means bold but also bullets and if you use two of them it’s italics
    • I can’t ever remember whether the alt tag goes first or second on an image
    • I can’t remember if the square brackets go first or the round ones
    • I can’t remember if the bang goes before images or links

1 thought on “CCATP #419 Bart Busschots Pretty Markdown & HTML Links with TextExpander & Perl

  1. Caleb - January 5, 2016

    Allison,

    The impact of the “target=_blank” being missing or not default in Markdown (and related markups) is probably less than you might think. This is due to the built in browser “back button”, I don’t mean that in a snarky way. This basic behavior in a browser is something that nearly all users understand. If a user knows to ctrl+click or middle button/scroll wheel click a link they are unaffected by the lack of “target=_blank” and if they don’t know about the “new tab” feature there is a very good chance they know about the “back” button which will take them back to your page.

    Also if your content is compelling enough (which is almost a given for you) they’ll be back, and/or they’ll go back to their search engine and look for you again. In either case you’re unlikely to lose much traffic by not using “target=_blank”.

    You should give Byword a little more time. It has a built in preview mode, an export function for multiple file types, _and_ it supports keyboard shortcuts for common things like cmd + i for italics. You might find the way out of your frustration in their help menu. Oh and in the latest version it offers export to a number of blogging engines, including WordPress.

    You mentioned that the lack of live preview for Markdown was a drawback. To that end I submit to you Marked. This is a great app to put next to your text editor. For example when I write I like to use TextWrangler (or emacs) and have it use 50% of the screen with Marked in the other 50%. I start and save the .md or .markdown file (or heck even a .txt will do), then point Marked at that file, or folder. Now any changes I make will be updated in the Marked app. Bonus features: Marked will update from MarsEdit, and will export to a variety of formats. There’s a lot more but these seem to fit/fulfill your requirements, especially since you already have Byword.

    That said it sounds like you want _one_ app for the whole shebang. There are many other good options.

    Atom – You already have this app because of CCAP: PBS. It has a Markdown mode, which will do syntax highlighting and a preview pane. And since it is pretty easy to extend Atom, there are lots of plugins to help – https://atom.io/packages/search?q=markdown . You’ll probably find Markdown Writer useful to you.
    MacDown – An open source Markdown editor, with included preview and common keyboard short cuts (aka cmd + i = italic text) that is inspired by Mau.
    – Mau – http://25.io/mou/ – A simple app for writing Markdown that also does preview. Contains a similar feature set to Macdown.
    – Haroopad – http://pad.haroopress.com/user.html – A cross platform app with LOTS of options.
    – Texts – http://www.texts.io/features/ – This app is aimed at doing academic papers but has plenty of good things for generally writing Markdown.

    For myself writing in Markdown allows me to focus more on what I’m writing rather than how I’m writing. I can transition from a creative work to a blog entry to a todo list with out having to re-frame my mind to a different syntax. If I were doing that in HTML or XML I’d easily be bogged down in li tags and un-closed h3 tags. The nice part of Markdown is that I can get HTML out of it, while writing in a way that my brain easily digests. Which may be why Markdown comes easily to Bart and I but is harder for you. To us the mental gymnastics that go from [link text](url destination) or _this is now italic_ while **this is bold** is almost second nature, although I admit it did take a little while of having a cheat sheet on hand to keep it all straight.

    A side note about italics vs. underline – they mean the same thing, at least to a typographer/type setter, Commnet.edu has a nice break down of the subject.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top