Tag: rc

YATC, mb(1) “microbe” updated

Posted by – April 23, 2011

I updated the simple Plan 9 microblogging scripts, mb(1), not often but sometimes also called “microbe”, and almost never known as “meekroh-Bee”.

All file and environment variable names have changed since the last release (c.2009, AD), replacing the “special” character micro (HTML’s µ, µ, µ) with a plain m.

The awk|sed filter pipeline at the center of any useful improvement was taken from Stanley Lieber’s tw Twitter script.

Mb/read changes

  1. Uses XML API
  2. Changed output order: now oldest-first. A feature, especially in acme(1). Get the old school, newest-first ordering by appending, e.g., | sed 'x;1!H;$!d;x'
  3. No timestamps shown
  4. No “from client” source tag shown
  5. Directory moved
    • /rc/bin/µb/ => /rc/bin/mb/
  6. Environment variables renamed
    • µblog => mbapiurl
    • µsr => mbuser

Mb/write changes

Trivial. Write always spoke API, so the the changes were limited, syncing env names, etc.

Example: Twitter

A side effect of proper API use gives mb/read ready access to Twitter timelines through services like the Supertweet API proxy.

To use the Supertweet service, visit their site to OAuth‘orize a Supertweet account to your Twitter account. You must then assign a password to your Supertweet account that will be used for HTTP Basic auth to the API proxy. You can then mb/read and mb/write Twitter:

Say it:

% mb/write -h http://api.supertweet.net/1 Hello World.

See it:

% mb/read -h http://api.supertweet.net/1

You’ll be asked for the proxy name and password you created at Supertweet unless it is available from factotum(4).

Download and (more!?) details