X-Git-Url: https://vcs.fsf.org/?p=rainbowstream.git;a=blobdiff_plain;f=rainbowstream%2Frainbow.py;h=9134e03c5e97335f5e25fc49f41821ae80335baa;hp=b15ef593111f8746e293f9ba6211e8dbce52aa55;hb=084a4cbcd776283cd5978292180bec0b60775340;hpb=21f1b9ca0badc02f0a5da2d77630b8ffe9a47ffb diff --git a/rainbowstream/rainbow.py b/rainbowstream/rainbow.py index b15ef59..9134e03 100644 --- a/rainbowstream/rainbow.py +++ b/rainbowstream/rainbow.py @@ -375,6 +375,21 @@ def view(): printNicely(red('A name should begin with a \'@\'')) +def view_my_tweets(): + """ + Display user's recent tweets. + """ + t = Twitter(auth=authen()) + try: + num = int(g['stuff'].split()[1]) + except: + num = c['HOME_TWEET_NUM'] + for tweet in reversed( + t.statuses.home_timeline(count=num)): + draw(t=tweet) + printNicely('') + + def search(): """ Search @@ -1764,6 +1779,7 @@ cmdset = [ 't', 'rt', 'quote', + 'mytw', 'allrt', 'conversation', 'fav', @@ -1812,6 +1828,7 @@ funcset = [ tweet, retweet, quote, + view_my_tweets, allretweet, conversation, favorite,