Tuesday 26 August 2014

Mark Down

Download

Beanshell: download

Requirement

A markdown based parser that can work in on both desktop and mobile platform. In this, the daringfireball offering falls short aimed heavily at blogging platforms and Perl on the command line.

The syntax, like with any Markdown concept has to be simple to use. See the README for details.

Beanshell is a requirement of this script. Beanshell is a Java based scripting language available for any platform that Java is available for.

- Android SL4A and BeanShell for Android.

- Desktop Create a wrapper script which triggers Beanshell. I made this (linux/Mac) utility for the purpose.

Design

The intention was to use the system clipboard as a general purpose (and useful) mechanism to allow the user to interact with the script without getting in the way of the workflow of creating a blog article.

The script will look for the contents of the system clipboard, parse the contents and then re-paste the parsed text back to the clipboard. This is neat because it works on both Desktop and Mobile, and is simple requiring no user interface other than notification messages.

The actual parser is a simple Regular Expression based parse that applies the expressions line by line. Not terribly elegant but suitable for the objective we are trying to acheive.

Final Thought

The original objective was to create something so compact it could fit into a QR code. However that seems unlikely to fit unless a different approach is taken.

No comments:

Post a Comment