Send to Kindle

Authoring and posting blogs from text editors

The other day, I made an improvement on this site so I can write a formatted text in markdown. HTML is such a cumbersome markup language and it takes focus away from the body of I am writing. Now I am confortably writing with markdown.

I thought it would be also nice if I can write without opening a web browser. It is especially useful when I am offline. So, I added a simple Application Programming Interface to this site so that it accepts creation and update of posts. Now when I want to write something, I simply have to open an editor of my choise, write a post and the posting is just a command away, which I can also execute in the same window since I am using vi as an editor.

I don't really have to check back with a web browser on the actual post because I would make formatting errors much less often thanks to the simplicity of markdown.

markdown2, a python implementation of markdown has another advantage over HTML. There are so called Extras to the original markdown syntax so we can do more. An Extra I especially like is footnote. In my personal project web site, I like to keep the references of the articles that are helping to accomplish the project goals. footnote does it very well. I can keep listing the articles in the format like this:

[^some-label-name]: [Roomba telepresence robot](

Then I can insert the same label whereever in my text like this.

Daigo wants to turn his old Roomba into a telepresence robot.[^some-label-name]

It would actually looks like this:

Daigo wants to turn his old Roomba into a telepresence robot.1

It even arranges the order of references by appearance. This is really a powerful feature.

I read a lot of pages as I collect knowledge necessary to my projects, and I used to find it a little tough to keep the list of all the pages. footnote feature is helping me a lot. To make it even more efficient, I made a bookmarklet 2 that extract the title and URL of the currently open web page on the browser, and format it into markdown footnote. The bookmarklet is a very simple JavaScript, and it looks like this:

javascript:alert('[^]: ['+document.title+']('+document.URL+')');

It sits on the bookmark bar on my Chrome browser, and pops with the footnote text when I click it, and I can copy and paste it to text editor.

Overall, I am happy with my new blogging environment I created for myself.

  1. Roomba telepresence robot | Daigo lab 

  2. A bookmarklet is a short JavaScript that is saved as a bookmark of web browsers and executes JavaScript program on the web page the browser is currently displaying. 

Original post: April 5, 2014 | Last updated: April 6, 2014

Previous: The tools I use for reading and sharing
Next: Another way to give back
Read more

comments powered by Disqus