# built documents.
#
# The short X.Y version.
-version = '0.8.8'
+version = '0.8.9'
# The full version, including alpha/beta/rc tags.
-release = '0.8.8'
+release = '0.8.9'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
+ ``#owner``: owner's username with '@'\r
+ ``#tweet``: original tweet\r
\r
+- ``THREAD_META_LEFT``: format for meta information of messages from partner which is display in the left of screen.\r
+\r
+- ``THREAD_META_RIGHT``: format for meta information of messages from you which is display in the right of screen.\r
+\r
+- ``THREAD_MIN_WIDTH``: minimum width of a message frame.\r
+\r
- ``MESSAGES_DISPLAY``: default messages to display on 'inbox' or 'sent' command.\r
\r
- ``TREND_MAX``: default trends to display on 'trend' command.\r
// 'thread' meta format
"THREAD_META_LEFT" : "(#id) #clock",
"THREAD_META_RIGHT" : "#clock (#id)",
+ // 'thread' frame's minimum width
+ "THREAD_MIN_WIDTH" : 20,
// 'inbox','sent': default number of direct message
"MESSAGES_DISPLAY" : 5,
// 'trend': max trending topics
"rt" : 202,
"link" : 154,
"hashtag" : 37,
+ "mytweet" : 202,
"keyword" : "on_light_green"
},
"rt" : 179,
"link" : 74,
"hashtag" : 198,
+ "mytweet" : 179,
"keyword" : "on_light_green"
},
"rt" : 66,
"link" : 23,
"hashtag" : 64,
+ "mytweet" : 66,
"keyword" : "on_light_green"
},
"rt" : 145,
"link" : 30,
"hashtag" : 67,
+ "mytweet" : 145,
"keyword" : "on_light_blue"
},
media_url = None
# Filter and ignore
+ mytweet = screen_name == c['original_name']
screen_name = '@' + screen_name
fil = list(set((fil or []) + c['ONLY_LIST']))
ig = list(set((ig or []) + c['IGNORE_LIST']))
# Highlight link
tweet = lmap(
lambda x: color_func(c['TWEET']['link'])(x)
- if x[0:4] == 'http'
+ if x.startswith('http')
else x,
tweet)
# Highlight hashtag
if x.startswith('#')
else x,
tweet)
+ # Highlight my tweet
+ if mytweet:
+ tweet = [color_func(c['TWEET']['mytweet'])(x)
+ for x in tweet
+ if not any([
+ x == 'RT',
+ x.startswith('http'),
+ x.startswith('#')])
+ ]
# Highlight keyword
tweet = ' '.join(tweet)
if keyword:
h, w = os.popen('stty size', 'r').read().split()
w = int(w)
frame_width = w // 3 - dg['frame_margin']
+ frame_width = max(c['THREAD_MIN_WIDTH'], frame_width)
step = frame_width - 2 * dg['frame_margin']
slicing = textwrap.wrap(m['text'], step)
spaces = w - frame_width - dg['frame_margin']
h, w = os.popen('stty size', 'r').read().split()
w = int(w)
frame_width = w // 3 - dg['frame_margin']
+ frame_width = max(c['THREAD_MIN_WIDTH'], frame_width)
step = frame_width - 2 * dg['frame_margin']
slicing = textwrap.wrap(m['text'], step)
spaces = dg['frame_margin']
name = credential['name']
if not get_config('PREFIX'):
set_config('PREFIX', screen_name)
- g['original_name'] = screen_name[1:]
+ c['original_name'] = g['original_name'] = screen_name[1:]
g['full_name'] = name
g['decorated_name'] = lambda x: color_func(
c['DECORATED_NAME'])('[' + x + ']: ')
import os.path
# Bumped version
-version = '0.8.8'
+version = '0.8.9'
# Require
install_requires = [
* `rt`: color for `RT` word in tweet's content.
* `link`: color for an url.
* `hashtag`: color for a hashtag.
+ * `mytweet`: color for tweet's text from yourself.
* `keyword`: color for highlighted keyword (in tweets search).
* `MESSAGE`: colors of parts in message's output.
* `partner`: color for __partner__.