From 211e8be1e97c2583894b4bb3f9ea4d8e1f225025 Mon Sep 17 00:00:00 2001 From: vunhat_minh Date: Fri, 24 Oct 2014 12:22:17 +0900 Subject: [PATCH] use only g[PREFIX] to display --- docs/conf.py | 4 ++-- rainbowstream/rainbow.py | 11 +++++------ setup.py | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 628c223..03182df 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,9 +48,9 @@ copyright = u'2014, Vu Nhat Minh' # built documents. # # The short X.Y version. -version = '1.1.9' +version = '1.2.0' # The full version, including alpha/beta/rc tags. -release = '1.1.9' +release = '1.2.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/rainbowstream/rainbow.py b/rainbowstream/rainbow.py index f06b510..236c1b8 100644 --- a/rainbowstream/rainbow.py +++ b/rainbowstream/rainbow.py @@ -204,8 +204,7 @@ def init(args): name = credential['name'] if not get_config('PREFIX'): set_config('PREFIX', screen_name) - c['PREFIX'] = emojize(c['PREFIX']) - g['PREFIX'] = u2str(c['PREFIX']) + g['PREFIX'] = u2str(emojize(c['PREFIX'])) c['original_name'] = g['original_name'] = screen_name[1:] g['full_name'] = name g['decorated_name'] = lambda x: color_func( @@ -1964,7 +1963,7 @@ def reconn_notice(): light_green("h stream") + \ light_magenta(" for more details.") printNicely(guide) - sys.stdout.write(g['decorated_name'](c['PREFIX'])) + sys.stdout.write(g['decorated_name'](g['PREFIX'])) sys.stdout.flush() @@ -2053,10 +2052,10 @@ def stream(domain, args, name='Rainbow Stream'): # the 1st character of that word if current_buffer and g['cmd'] != current_buffer: sys.stdout.write( - g['decorated_name'](c['PREFIX']) + str2u(current_buffer)) + g['decorated_name'](g['PREFIX']) + current_buffer) sys.stdout.flush() elif not c['HIDE_PROMPT']: - sys.stdout.write(g['decorated_name'](c['PREFIX'])) + sys.stdout.write(g['decorated_name'](g['PREFIX'])) sys.stdout.flush() elif tweet.get('direct_message'): # Check the semaphore pause and lock (stream process only) @@ -2073,7 +2072,7 @@ def stream(domain, args, name='Rainbow Stream'): printNicely( magenta("We have connection problem with twitter'stream API right now :(")) detail_twitter_error(e) - sys.stdout.write(g['decorated_name'](c['PREFIX'])) + sys.stdout.write(g['decorated_name'](g['PREFIX'])) sys.stdout.flush() diff --git a/setup.py b/setup.py index 0e34739..ed0362c 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ import os import os.path # Bumped version -version = '1.1.9' +version = '1.2.0' # Require install_requires = [ -- 2.25.1