From 7d1fa1122f3969c2c68199562a2c50748ecc9294 Mon Sep 17 00:00:00 2001 From: Orakaro Date: Sun, 1 Jun 2014 12:07:17 +0900 Subject: [PATCH] delete unused --- rainbowstream/colors.py | 1 - rainbowstream/rainbow.py | 21 ++++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/rainbowstream/colors.py b/rainbowstream/colors.py index 694af96..4b8ab2c 100644 --- a/rainbowstream/colors.py +++ b/rainbowstream/colors.py @@ -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']) diff --git a/rainbowstream/rainbow.py b/rainbowstream/rainbow.py index 0bfb3fd..5e24014 100644 --- a/rainbowstream/rainbow.py +++ b/rainbowstream/rainbow.py @@ -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(): -- 2.25.1