Saturday, October 3, 2009

User Guide

If you can get a hold of this project, this is how you use it. It is not polished in every aspect quite yet, but it is indeed usable.

Installation

sudo apt-get install \
    mercurial \
    python \
    python-gdata \
    markdown

hg clone <source> blog
ln -s `pwd`/blog/blog.py <dir-in-path>/blog

Adding a blog to a project

cd <path-of-project>
blog init

Adding a blog-post

From anywhere inside the project:

EDITOR=<editor> blog add

Publishing to blogger.com

First, create a new blog via the web interface at blogger.com. Go to "Settings", "Formatting" and set "Convert line breaks" to "No".

Then execute

blog publish

You will be asked for all required details, including your Google-password. The details will be remembered, except for the password. Instead, a login will be performed and the login-token will be kept.

User-specific details will be written to ~/.blog.user, while project-specific details go to .blog in the project directory. You will want to add this last file to source control.

Blogging for the rest of us

After lots of trying, I finally found a blog name on blogger that wasn't occupied. "bftrou" stands for "Blogging for the rest of us". It seems that a lot of people are perfectly satisfied with writing in a web interface, potentially losing their blog post due to a browser crash or intermittent connection failure or similar, with no revision control and just keeping the blog on that one place on the web. The rest of us are not, and this tool is for us.

Suggestions for better names that are available are accepted :)

Source

The source code, and therefore the entire project, is not publicly available yet, due to a rather large outage of bitbucket. Bitbucket places the blame with Amazon. The best source for news on this is unfortunately twitter.

Completeness

Since you can't see the project, you can't evaluate it. For now, I can at least assure you that this blog is being written in markdown and published with this tool. It works!

Mission statement

I have come to realize that in order to think properly, I need to write. I have started this project in order to help me, and possibly others, act on this realization.

This project will provide a command line tool to aid in writing and publishing a blog as part of a programming project.

The command line tool should fit my regular workflow when programming, so it should sport an interface similar to that of popular source code management tools such as Mercurial. The interface should be suited to serve as a back-end for graphical user interfaces, but this project will not provide such an interface.

The syntax of the blog is Markdown. The Markdown-module of this project should of course be isolated and possible to exchange with other engines, but it is not considered important to actually supply alternative engines.

I feel very strongly about owning your data. This blogging tool will facilitate that by:

  • Keeping the blog entries as files in your project directory. Manage them with your SCM and you own the blog just as much as you own the source.
  • Providing a very plain "as HTML" "publishing"-method, to make sure that you never need to depend on a third party to have a blog.

However, publishing to Blogger will be the central feature, and a good way to make sure you can handle all traffic in the world without actually paying a dime. Not that your, or indeed my, blog will ever get any traffic, but it is good to feel safe :)