Plan 9 from Bell Labs’s /usr/web/sources/contrib/anothy/bin/rc/tweet

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc

# "echo your message here | tweet" or "tweet your message here"
# Set twitterapi to eg http://identi.ca/api to use another service.

# Josh Wood has a much elaborated version, and a reading script, at
# 	http://labs.utopian.net/who/josh/plan9/microbe/
#	/n/sources/contrib/josh/rc/mb
# Use that one instead.

rfork e

if (~ $twitterapi '')
	twitterapi=http://twitter.com

if (~ $#* 0)
	msg=`{read}
if not
	msg=$"*

hget -p 'source=hget&status='^$"msg $twitterapi^/statuses/update.json >/dev/null

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].