From: Orakaro Date: Fri, 19 Sep 2014 13:17:43 +0000 (+0900) Subject: add comments and fix bug in upgrade_center with python3 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9ee4a3cc95dcf0a00193655e5b543a36ce835198;p=rainbowstream.git add comments and fix bug in upgrade_center with python3 --- diff --git a/README.rst b/README.rst index 3548034..7727f72 100644 --- a/README.rst +++ b/README.rst @@ -182,7 +182,6 @@ steps source venv/bin/activate pip install -e . which rainbowstream # /this-directory/venv/bin/rainbowstream - pip list | grep rainbowstream # rainbowstream (0.x.x, /this-directory) # Remove ~/.rainbow_oauth if exists rainbowstream # local version of rainbowstream diff --git a/docs/conf.py b/docs/conf.py index 640b529..12243a6 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.0.5' +version = '1.0.6' # The full version, including alpha/beta/rc tags. -release = '1.0.5' +release = '1.0.6' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/index.rst b/docs/index.rst index e652ecd..e42c927 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -373,8 +373,8 @@ You also can view or set a new value of every config key by ``config`` command ( + ``#recipient_name``: Message's recipient name + ``#recipient_nick``: Message's recipient screen name -In every format, you can use unicode characters like ``\u2665``. -Mac users also can use emoji characters as well (Ex: ``::zap::``). +In every format, you can use unicode characters like ``\u2665``. +Mac users also can use emoji characters as well (Ex: ``::zap::``). See `Emoji cheatsheet`_ for details. Development @@ -404,7 +404,6 @@ steps source venv/bin/activate pip install -e . which rainbowstream # /this-directory/venv/bin/rainbowstream - pip list | grep rainbowstream # rainbowstream (0.x.x, /this-directory) # Remove ~/.rainbow_oauth if exists rainbowstream # local version of rainbowstream diff --git a/rainbowstream/colors.py b/rainbowstream/colors.py index 335847f..a39dcb6 100644 --- a/rainbowstream/colors.py +++ b/rainbowstream/colors.py @@ -3,6 +3,10 @@ def basic_color(code): 16 colors supported """ def inner(text, rl=False): + """ + Every raw_input with color sequences should be called with + rl=True to avoid readline messed up the length calculation + """ c = code if rl: return "\001\033[%sm\002%s\001\033[0m\002" % (c, text) @@ -16,6 +20,10 @@ def term_color(code): 256 colors supported """ def inner(text, rl=False): + """ + Every raw_input with color sequences should be called with + rl=True to avoid readline messed up the length calculation + """ c = code if rl: return "\001\033[38;5;%sm\002%s\001\033[0m\002" % (c, text) diff --git a/rainbowstream/rainbow.py b/rainbowstream/rainbow.py index b4cd5f9..d67be60 100644 --- a/rainbowstream/rainbow.py +++ b/rainbowstream/rainbow.py @@ -126,7 +126,7 @@ def upgrade_center(): try: current = pkg_resources.get_distribution("rainbowstream").version url = 'https://raw.githubusercontent.com/DTVD/rainbowstream/master/setup.py' - readme = requests.get(url).content + readme = requests.get(url).text latest = readme.split("version = \'")[1].split("\'")[0] if current != latest: notice = light_magenta('RainbowStream latest version is ') @@ -291,7 +291,8 @@ def view(): num = int(g['stuff'].split()[1]) except: num = c['HOME_TWEET_NUM'] - for tweet in reversed(t.statuses.user_timeline(count=num, screen_name=user[1:])): + for tweet in reversed( + t.statuses.user_timeline(count=num, screen_name=user[1:])): draw(t=tweet) printNicely('') else: diff --git a/setup.py b/setup.py index 1e28de9..07e5aa5 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ import os import os.path # Bumped version -version = '1.0.5' +version = '1.0.6' # Require install_requires = [