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
- Uses XML API
- 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'
. - No timestamps shown
- No “from client” source tag shown
- Directory moved from
/rc/bin/µb/
to/rc/bin/mb/
- Environment variables renamed:
µblog
tombapiurl
µsr
tombuser
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).