View Single Post
  #5   Report Post  
Posted to rec.crafts.metalworking
DoN. Nichols DoN. Nichols is offline
external usenet poster
 
Posts: 2,600
Default Bash function to post to Twitter via command line

On 2009-03-26, Ignoramus3943 wrote:
On 2009-03-26, DoN. Nichols wrote:
On 2009-03-25, Ignoramus23425 wrote:
################################################## ##### Twitter
# Usage:
#
# Twitter I am eating sushi right now
#
Twitter() {


[ ... ]

}


Nice and simple -- but I would have added a test to make sure that the
username and password had been set to something other than the defaults
you have in there. Or perhaps able to read them from a file like
~/.twitter/accountname so you could use it for mutiple accounts by
typing "twitter junque I am eating sushi right now" and it would read
the username and password for account "junque" before proceeding.


This is what I do, I have a file ~/.../.../twitter.txt with username
and password. It is secret. My family shares my .bashrc, so I cannot
have my twitter password there (which is unique and is not used on any
other website), but I have it in a secret file.


O.K. That will work.

Now -- all I need to do is to create a twitter account -- and
find people who are interested enough in my day-to-day minutiae to read
it. :-)


Well, when posting your minutiae is as easy as typing something on
command line, you may reconsider.


That deals with the ease part, but I can't imagine that anybody
is interested in what I just ate. Now for metalworking perhaps, but I
would rather do the work than type about it like that. (And when I *do*
describe it, it tends to be too many characters for twitter to accept.

I don't think that I would follow *anyone* here's tweets. I
don't *care* what anybody has for breakfast, and for the things which I
*do* care about -- I would want more detail than would be practical.

Enjoy,
DoN.

--
Email: | Voice (all times): (703) 938-4564
(too) near Washington D.C. | http://www.d-and-d.com/dnichols/DoN.html
--- Black Holes are where God is dividing by zero ---