Categories
Computers

Blogtool

I’ve now brought blogtool along far enough that I thought it would be worth taking stock of it so that I can figure out where next to go with it.

Blogtool is a command line blog client. It has no gui. Having been writing to the blog for a couple of months now, I can say that the whole GUI thing is overblown when it comes to posting. At least in my case. The vast majority of my posts are text, every now and again I’ll throw some pictures into the post. Either way, I came to feel that the GUI was not strictly necessary for client purposes. I felt a simple text file with some blog settings info in it would suffice. Having used what I have running, I’d say I was correct.

Blogtool allows for publishing posts to a blog using a simple header and body formatted file. The header consists of keywords followed by either an item, list or group. The body is the text of the post which can also contain links. I’ve just finished roughing in support for uploading image files specified in the body. This functionality also uses a keyword format. Blogtool takes care of uploading the file as well as generating the HTML image tag and inserting it into the post. The user simply specifies where the file is.

In addition to publishing new posts, blogtool also supports editing posts, retrieval of posts, deleting posts, and listing categories. I’ve also added a config file so that redundant post settings (like xmlrpc location) can be established in one place. The configuration settings in the config file are reconciled with individual post settings such that the post can always override the config file settings.

Other features are the ability to handle multiple blog configurations without having to specify common settings more than once. For instance, when pulishing a post to multiple blogs, the title is unlikely to change and it need only be set once. Of course, the title can also be set on a per blog basis. Blogtool can handle multiple post files specified on the command line.

What doesn’t blogtool do yet? It doesn’t support category creation. It doesn’t support post drafts. It doesn’t support anything to do with comments. It doesn’t support scheduled publishing of a post. Having been using it, I think it might also be nice if it launched the editor of choice if a post file is specified that doesn’t exist. Upon exiting the editor, blogtool could then continue as expected.

I still think some kind of support for markdown kind of formatting would be useful. Python has a markdown module, but I haven’t looked into how I might incorporate it into blogtool yet. Priority wise, this is low on the list since a lot can be done without it.

From a coding standpoint, aside from the normal sorts of refactoring the big thing it could use is improved error handling. In general, given valid configuration settings it should just work. Of course, misspelled keywords need to be dealt with and I need to be sure not to mangle things that I touch. Right now, it only supports WordPress blogs. I’m hoping to have a reasonable blogapi defined by the end of this so that support for other blog platforms is a simple as defining the proper support functions.

That’s about it. It’s not really at an alpha level yet, but it is close. A little more testing and coding first.

Leave a Reply

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