Tutorial

Setting up

You should have completed the steps in Installation and the service sections, that is having the following file(s) reside in the directory for your posts and all Dependencies installed properly.

Creating the first post

Let’s create a first post, my-first-post.rst or my-first-post.md, whatever markup language floats your boat:

!b
service: blogger
title: My First Post
labels: blogging

Hooray, posting frm commandline!

The first three lines are called Header, when b.py sees !b in the beginning of file, it knows what to do with the header. If you are using WordPress, change service line to:

service: wordpress

Posting to the service

After saves the file, run the following command to post it to the service:

b.py post my-first-post.rst

If it runs without any problems, then open the file again, the header part should have been edited by b.py and may look like:

.. !b
   service: blogger
   kind: post
   url: http://[...].blogspot.com/2013/01/my-first-post.html
   labels: blogging
   id_affix: 5e5f
   blog: <THE BLOG ID>
   id: <THE POST ID>
   title: My First Post

b.py will insert some data to header and make header into a comment.

See also

For the detail of header, please see Header.

Updating the post

After posting to the service, you spot there is a typo frm and you correct it. To update the post, run the same command as posting:

b.py post my-first-post.rst

The post should be updated on the service.

If b.py sees blog and id in header, then it knows that’s a post already published, so it will update it instead of creating a new post.

Table Of Contents

Previous topic

Introduction

Next topic

b.py command

This Page