delete unused
authorOrakaro <nhatminh_179@hotmail.com>
Sun, 1 Jun 2014 03:07:17 +0000 (12:07 +0900)
committerOrakaro <nhatminh_179@hotmail.com>
Sun, 1 Jun 2014 03:07:17 +0000 (12:07 +0900)
rainbowstream/colors.py
rainbowstream/rainbow.py

index 694af96ff71c5647ef00ebae3f695d292ee76a51..4b8ab2c775366eea73e8a12667cb5760f4fc715e 100644 (file)
@@ -3,7 +3,6 @@ import itertools
 from functools import wraps
 from termcolor import *
 from pyfiglet import figlet_format
-from functools import reduce
 
 grey = lambda x: colored(x, 'grey', attrs=['bold'])
 red = lambda x: colored(x, 'red', attrs=['bold'])
index 0bfb3fd5cca562b7ba2c3c2e2fd525899d4cf683..5e240148f71e49d74f0980cde02548b07bea7de3 100644 (file)
@@ -1,7 +1,6 @@
 """
 Colorful user's timeline stream
 """
-from __future__ import print_function
 from multiprocessing import Process
 from dateutil import parser
 
@@ -188,8 +187,8 @@ def switch():
             if g['stuff'].split()[-1] == '-f':
                 only = raw_input('Only nicks: ')
                 ignore = raw_input('Ignore nicks: ')
-                args.filter = only.split(',')[0]
-                args.ignore = ignore.split(',')[0]
+                args.filter = filter(None,only.split(','))
+                args.ignore = filter(None,ignore.split(','))
             elif g['stuff'].split()[-1] == '-d':
                 args.filter = ONLY_LIST
                 args.ignore = IGNORE_LIST
@@ -348,10 +347,10 @@ def friend():
     t = Twitter(auth=authen())
     g['friends'] = t.friends.ids()['ids']
     for i in g['friends']:
-        screen_name = t.users.lookup(user_id=i)[0]['screen_name']
-        user = cycle_color('@' + screen_name)
-        print(user, end=' ')
-    printNicely('')
+        name = t.users.lookup(user_id=i)[0]['name']
+        screen_name = '@' + t.users.lookup(user_id=i)[0]['screen_name']
+        user = cycle_color(name) + grey(' ' + screen_name + ' ')
+        print user
 
 
 def follower():
@@ -361,10 +360,10 @@ def follower():
     t = Twitter(auth=authen())
     g['followers'] = t.followers.ids()['ids']
     for i in g['followers']:
-        screen_name = t.users.lookup(user_id=i)[0]['screen_name']
-        user = cycle_color('@' + screen_name)
-        print(user, end=' ')
-    printNicely('')
+        name = t.users.lookup(user_id=i)[0]['name']
+        screen_name = '@' + t.users.lookup(user_id=i)[0]['screen_name']
+        user = cycle_color(name) + grey(' ' + screen_name + ' ')
+        print user
 
 
 def help():