Twitter CLI Teaser

I sort of forget what my original project entailed…something about tweeting via the command line, for Arduino purposes. You can pretty much just toss a bunch of words in a hat, and add ‘Arduino’ and ‘Command Line’ to them, and there you have one of my typical projects.

Anyhow, here we find ourselves. I am missing some dependencies with OAuth, but have managed to get twitter working from an interactive python shell:

cli twitter
command line-y

This section is as much for my reference as it is for public knowledge…I snagged the commands that I ran to snag my comments. It first prints swantr0n (my dev account) and then my primary Twitter feed, @swantron

swantron@mini9:~$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import twitter
>>> api = twitter.Api()
>>> feedSwantron = api.GetUserTimeline(‘swantron’)
>>> feedSwantr0n = api.GetUserTimeline(‘swantr0n’)
>>> print [ x.text for x in feedSwantr0n]
[‘development account for @swantron | tune into http://t.co/SpDFBkK for projects’, ‘hello world’]
>>> print [ x.text for x in feedSwantron]
[‘@vftb …you better believe it’, ‘Twitter Project Teaser : http://t.co/7ZrOLUn | one step closer to tweeting from the #CLI … might take a run at make it tweet’, ‘Might need to implement some sleeves into my wardrobe… @adafruit just flipped the script with open source cuff links’, ‘unsafe at any speed… updating #ubuntu on the road http://t.co/Q8gfc56’, ‘Upgrading Mini 9 to #Ubuntu Natty http://t.co/7yT9w81 | posting to kill time… review here ( http://t.co/RM675lX ) lunch-aft on the morrow’, ‘https://swantron.com/basic-mower-cord-repair/ #DIY lawn mower repair from a #math major. spoiler: it works’, “#arduino no you didn’t https://swantron.com/html-to-python-to-arduino-to-lcd/ #LCD project, stepped up a bit”, ‘working on a python script to dump info from web to LCD https://swantron.com/python-teaser/ #arduino’, ‘http://youtu.be/MpomhE6dgww video of #boc unboxing (for the win)’, ‘#woot bag-o-crap unboxing @ https://swantron.com/woot-boc-unboxing/ not too shabby’, ‘https://swantron.com/compiz-error-in-ubuntu-natty/ still finding some compiz issues in #ubuntu 11.04’, ‘#Arduino project @ https://swantron.com/command-line-lcd-arduino-interface/ | driving LCD screen via command line’, ‘@RobotGrrl… what version are you running? I had no problems with IOIO / Droid 2 (froyo 2.2)’, ‘Easy LCD #Arduino Display | https://swantron.com/easy-lcd-arduino-display/ | feels good to have a warm soldering iron and functional hardware’]
>>>

I will keep plugging away until I get this thing hammered out. If not, I can print this suff to my LCD for a real-time Twitter display. Could be cool either way.

One Reply to “Twitter CLI Teaser”

Leave a Reply