g['themes'] = themes
g['pause'] = False
g['message_threads'] = {}
+ # Events
+ g['events'] = []
# Startup cmd
g['cmd'] = ''
+ # Retweet of mine events
+ c['events'] = []
# Semaphore init
c['lock'] = False
# Init tweet dict and message dict
printNicely('')
+def notification():
+ """
+ Show notifications
+ """
+ g['events'] = g['events'] + c['events']
+ if g['events']:
+ for e in g['events']:
+ print_event(e)
+ printNicely('')
+ else:
+ printNicely(magenta('Nothing at this time.'))
+
+
def mentions():
"""
Mentions timeline
light_green('trend JP Tokyo') + '.\n'
usage += s * 2 + light_green('home') + ' will show your timeline. ' + \
light_green('home 7') + ' will show 7 tweets.\n'
+ usage += s * 2 + \
+ light_green('notification') + ' will show your recent notification.\n'
usage += s * 2 + light_green('mentions') + ' will show mentions timeline. ' + \
light_green('mentions 7') + ' will show 7 mention tweets.\n'
usage += s * 2 + light_green('whois @mdo') + ' will show profile of ' + \
'switch',
'trend',
'home',
+ 'notification',
'view',
'mentions',
't',
switch,
trend,
home,
+ notification,
view,
mentions,
tweet,
['public', 'mine'], # switch
[], # trend
[], # home
+ [], # notification
['@'], # view
[], # mentions
[], # tweet
while c['lock']:
time.sleep(0.5)
print_message(tweet['direct_message'])
+ elif tweet.get('event'):
+ g['events'].append(tweet)
+ print_event(tweet)
except TwitterHTTPError:
printNicely('')
printNicely(