Six months ago, I announced my own blogging script, b.py (PyPI). Just a few hours ago, a new release was tagged as Version v0.5.0, half way to the v1.0.0.

1   What has changed?

To be honest, it didn’t gain many features. It’s not I was stalling writing the code, but Blogger does. The API v3 hasn’t got any improvements since then. I have been waiting for page support, but it has not yet added, and I have no idea when Blogger will. I even asked in developer’s group, but it’s just a standard response and no follow-ups since then.

Nonetheless, one major feature is link checking with lnkckr, which ensures you link properly. No more accidentally broken links as long as you make sure you check your post. Also some minor fixes, tests, and more options for handlers.

2   How I blog from command-line and Vim

With my brc.py, vimrc, and preview template, I usually blog with the following process:

  1. create a new reStructuredText source file and edit it in Vim.

    b.py supports reST, Markdown, HTML, or plain text. But I have been using reST for a while and it’s the best in my opinion, because of its extensibility if you can code for your needs.

  2. F5 to generate preview and open /tmp/preview.html in browser.

    This is same as running b.py generate foobar.rst in command-line.

  3. edit more and fix spelling.

  4. ,chk to check links, make sure I don’t mess up linking.

    This is same as running b.py checklink foobar.rst in command-line.

  5. ,post to publish the blog post.

    This is same as running b.py post foobar.rst in command-line.

    Once the post is published, the source is edited by b.py to insert more metadata. Vim will ask me if I want to load the edited version, L to load it.

  6. Check the actual published post to make sure everything is correct. If I mess up something, fix the post, then do the post command to update the post.

  7. If everything is correct, I add the source file to my blog post repository.

3   Why I am writing this post?

I hope this will get people to know about b.py, I know many people can at least write in Markdown because of StackOverflow and/or GitHub, and some of them may be bloggers on Blogger. My way of blogging is more efficient and you don’t need to deal with typesetting or curse Blogger’s WYSIWYG editor because it somehow doesn’t want to give your the style you demand.

You may have known GoogleCL, unfortunately, it was never a viable option. Before b.py, it’s b.sh, which was a Bash script utilized GoogleCL. But GoogleCL uses Blogger API v2, which has a big issue with <br/> and Blogger doesn’t seem to care about it. Short answer is it messes up your post. I was left no choice but moved onto API v3 with my own script, but the lack of updates on v3 makes me wonder if I should’ve just switched to another blogging platform.

Since I started using b.py, I had only gone to the Blogger’s interface to post a single post. Just once, which was an empty post. It’s much efficient and more robust. I have all changes of most of my blog posts, any edits or fixes are all committed. They are all in reST or Markdown, so I have a copy of my posts, which is more portable than Blogger XML Export.

If one day I want to go somewhere, it’s easier. Yes, there must be some official importer, but you can’t be sure new platform will 100% parse the HTML from Blogger correctly. If the new platform accepts same lightweight markup language, it’s pain-free. That’s why I claim this way is more portable.