Hello everyone. It's been a while. But the good news are that I'm going to post more often, now that I have a more convenient way to create posts.
See, up until now I have been writing my posts in HTML, which is rather cumbersome and not at all fun. Especially when you have to edit your post.
If you don't think it's that annoying - think about writing lists (that's right, <ul><li> and all that fun.)
The most annoying part, though, had to do with inserting code blocks.
I use this wonderful free tool called Syntax Highlighter for bloggers, but to use it you have to manage quite a bit of HTML noise around each small code snippet.
To counter all these difficulties (seeing as Blogger's editor is crap for programmers who want to provide code examples), I made a fun little script called PostParser.
PostParser allows you to write your blog posts in a very convenient way (just like I'm doing now), and then parse it to proper valid HTML for you.
Don't worry, it comes with an example input file, which is really small and concise.
Using it is really easy: all you need to do is open up VIM, Emacs or Notepad (or any other editor that doesn't get in your way), write some text rather intuitively, and pass it in to the parser. Then just copy the output into a new post in your blog.
And since all you have is a text file, it's really easy and cool to pass it through a program like Aspell for fixing your spelling errors just before you post.
You can view or download it in GitHub
Currently supported:
Headers
Sub headers
paragraphs with bold or italic text
class CodeSnippets {}Images, and links
Hi Yam,
ReplyDeleteWhy not use something like Markdown?
I wasn't aware of the module. I looked at PyParsing but couldn't be bothered to familiarize myself with its usage.
ReplyDeleteI might just use Markdown from now on, as it seems to serve every purpose (if I can manage to customize the code snippet output). Thanks!