add color for my nick and fix https open bug
authorOrakaro <nhatminh_179@hotmail.com>
Tue, 26 Aug 2014 16:06:27 +0000 (01:06 +0900)
committerOrakaro <nhatminh_179@hotmail.com>
Tue, 26 Aug 2014 16:06:27 +0000 (01:06 +0900)
docs/conf.py
rainbowstream/colorset/larapaste.json
rainbowstream/colorset/monokai.json
rainbowstream/colorset/solarized.json
rainbowstream/colorset/tomorrow_night.json
rainbowstream/draw.py
rainbowstream/rainbow.py
setup.py
theme.md

index 3ae892963ca6333b7ab7cd2d99276a71c96d958c..367ae8f34f0af8c055e75e67e442f6b110f4ec44 100644 (file)
@@ -48,9 +48,9 @@ copyright = u'2014, Vu Nhat Minh'
 # built documents.
 #
 # The short X.Y version.
-version = '0.8.9'
+version = '0.9.0'
 # The full version, including alpha/beta/rc tags.
-release = '0.8.9'
+release = '0.9.0'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
index a6bdb45695953e7a7175443fce473ab0f417cd65..495a63b4191998002545797fbb557eff5ca1f1ea 100644 (file)
@@ -23,6 +23,7 @@
     "DECORATED_NAME" : 37,
     "CYCLE_COLOR" :[37,184,202,154,59,230],
     "TWEET" : {
+        "mynick"          : 202,
         "nick"            : 37,
         "clock"           : 184,
         "id"              : 184,
index d9c7bb33b3bb70b88059539859548d2cecfc1a3b..68365ca16f4746f442711ad00d8b8fd8bd9cb0f0 100644 (file)
@@ -23,6 +23,7 @@
     "DECORATED_NAME" : 198,
     "CYCLE_COLOR" :[198,57,166,50,179,74,112],
     "TWEET" : {
+        "mynick"          : 179,
         "nick"            : 112,
         "clock"           : 57,
         "id"              : 166,
index e9eb1e0a33d1229024332e3789cc4b2cbe8c352b..99863e5f2158aff73858a508ccab25be0f93070f 100644 (file)
@@ -23,6 +23,7 @@
     "DECORATED_NAME" : 64,
     "CYCLE_COLOR" :[124,32,64,66,130,23],
     "TWEET" : {
+        "mynick"          : 66,
         "nick"            : 64,
         "clock"           : 32,
         "id"              : 130,
index 3bd27dc1548dc33a0c00f190fb03ced9a5a2e368..d48b683ab07cb6c201fbaf60b1e0d19c858fac77 100644 (file)
@@ -23,6 +23,7 @@
     "DECORATED_NAME" : 67,
     "CYCLE_COLOR" :[67,166,30,97,58,179,145],
     "TWEET" : {
+        "mynick"          : 145,
         "nick"            : 67,
         "clock"           : 58,
         "id"              : 58,
index 5bde76c4c8074741ea8a948c05c93cea7134c089..9ce1897f360e80f7d9c7a5b3c55d1cca822a3423 100644 (file)
@@ -223,7 +223,10 @@ def draw(t, keyword=None, humanize=True, fil=[], ig=[]):
 
     # Format info
     name = cycle_color(name)
-    nick = color_func(c['TWEET']['nick'])(screen_name)
+    if mytweet:
+        nick = color_func(c['TWEET']['mynick'])(screen_name)
+    else:
+        nick = color_func(c['TWEET']['nick'])(screen_name)
     clock = clock
     id = str(rid)
     fav = ''
index 5542ca7ba6947184fd0af8183471095df9f94d02..f58d59c314dc158b3694394dd592054f949c7af3 100644 (file)
@@ -461,10 +461,9 @@ def urlopen():
             return
         tid = c['tweet_dict'][int(g['stuff'])]
         tweet = t.statuses.show(id=tid)
-        link_ary = [
-            u for u in tweet['text'].split() if u.startswith('http://')]
-        link_ary.extend([
-            u for u in tweet['text'].split() if u.startswith('https://')])
+        link_prefix = ('http://', 'https://')
+        link_ary = [u for u in tweet['text'].split()
+                    if u.startswith(link_prefix)]
         if not link_ary:
             printNicely(light_magenta('No url here @.@!'))
             return
index 447c9da3ef85d21615d849393c47144d7affd2ab..da18822e6673db00a6f9615762c241ba88b153fc 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ import os
 import os.path
 
 # Bumped version
-version = '0.8.9'
+version = '0.9.0'
 
 # Require
 install_requires = [
index 6e27d090e27758df0fd6a6a08dcf7f025db15238..1ad272f9c0a1c7d09f303bb4990c2cbb83c19546 100644 (file)
--- a/theme.md
+++ b/theme.md
@@ -134,7 +134,8 @@ Color reference can be found at
   * Color selection is cycle through this list but with _memoization_.
   * It's means that same names will appear in same colors.
 * `TWEET`: colors of parts in a tweet's ouput.
-  * `nick` : color for Twitter __username__.
+  * `mynick` : color for your Twitter __username__.
+  * `nick` : color for other Twitter __username__.
   * `clock`: color for time of tweet.
   * `id`: color for tweet's id.
   * `favorite`: color for the star symbol when a tweet is favorited by you.