update
[rainbowstream.git] / rainbowstream / rainbow.py
index a2d0c381e09a9dc74ecf2e6aaaa615f5b0b3b6cc..29cba75f9e5ae70ff551b0bad1822020a413c7d1 100644 (file)
@@ -9,7 +9,6 @@ import os
 import os.path
 import argparse
 import sys
-import time
 import signal
 
 from twitter.stream import TwitterStream, Timeout, HeartbeatTimeout, Hangup
@@ -275,7 +274,7 @@ def help():
     usage = '''
     Hi boss! I'm ready to serve you right now!
     ----------------------------------------------------
-    "home" will show your timeline. "home 7" will print 7 tweet.
+    "home" will show your timeline. "home 7" will show 7 tweet.
     "view @bob" will show your friend @bob's home.
     "t oops" will tweet "oops" immediately.
     "rt 12345" will retweet to tweet with id "12345".
@@ -284,7 +283,7 @@ def help():
     "s #AKB48" will search for "AKB48" and return 5 newest tweet.
     "fr" will list out your following people.
     "fl" will list out your followers.
-    "h" will print this help once again.
+    "h" will show this help again.
     "c" will clear the terminal.
     "q" will exit.
     ----------------------------------------------------
@@ -305,6 +304,7 @@ def quit():
     """
     Exit all
     """
+    db.truncate() 
     os.kill(g['stream_pid'], signal.SIGKILL)
     sys.exit()
 
@@ -352,6 +352,8 @@ def stream():
 
     # The Logo
     ascii_art()
+    g['stuff'] = '1'
+    home()
     # These arguments are optional:
     stream_args = dict(
         timeout=args.timeout,
@@ -366,7 +368,7 @@ def stream():
     # Get stream
     stream = TwitterStream(
         auth=authen(),
-        domain='userstream.twitter.com',
+        domain=DOMAIN,
         **stream_args)
     tweet_iter = stream.user(**query_args)