# built documents.
#
# The short X.Y version.
-version = '0.7.3'
+version = '0.7.4'
# The full version, including alpha/beta/rc tags.
-release = '0.7.3'
+release = '0.7.4'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Rainbow Stream has a config file located at ``~/.rainbow_config.json``.\r
You can view or set a new value of every config key by ``config`` command (See **Interactive mode** section above).\r
\r
+- ``HEARTBEAT_TIMEOUT``: after this timeout (count by minutes), the stream will automatically hangup.\r
+\r
+- ``IMAGE_ON_TERM``: display tweet's image directly on terminal.\r
+\r
- ``THEME``: current theme.\r
\r
- ``ASCII_ART``: diplay your twitter name by ascii art at stream begin or not.\r
\r
-- ``HIDE_PROMPT``: Hide prompt after receiving a tweet or not.\r
+- ``HIDE_PROMPT``: hide prompt after receiving a tweet or not.\r
+\r
+- ``PREFIX``: display string of prompt.\r
\r
- ``SEARCH_MAX_RECORD``: max tweets can display on 'search' command.\r
\r
{
+ // After 120 minutes, the stream will automatically hangup
+ "HEARTBEAT_TIMEOUT" : 120,
// Image on term
"IMAGE_ON_TERM" : false,
// Themes
// Autocomplete history file name
"HISTORY_FILENAME" : "completer.hist",
// Image config
- "IMAGE_SHIFT" : 10,
- "IMAGE_MAX_HEIGHT" : 40,
+ "IMAGE_SHIFT" : 2,
+ "IMAGE_MAX_HEIGHT" : 90,
// Stream config
"USER_DOMAIN" : "userstream.twitter.com",
"PUBLIC_DOMAIN" : "stream.twitter.com",
'-to',
'--timeout',
help='Timeout for the stream (seconds).')
- parser.add_argument(
- '-ht',
- '--heartbeat-timeout',
- help='Set heartbeat timeout.',
- default=90)
- parser.add_argument(
- '-nb',
- '--no-block',
- action='store_true',
- help='Set stream to non-blocking.')
parser.add_argument(
'-tt',
'--track-keywords',
# These arguments are optional:
stream_args = dict(
timeout=0.5, # To check g['stream_stop'] after each 0.5 s
- block=not args.no_block,
- heartbeat_timeout=args.heartbeat_timeout)
+ block=True,
+ heartbeat_timeout=c['HEARTBEAT_TIMEOUT'] * 60)
# Track keyword
query_args = dict()
if args.track_keywords:
break
elif tweet is HeartbeatTimeout:
printNicely("-- Heartbeat Timeout --")
+ guide = light_magenta("You can use ") + \
+ light_green("switch") + \
+ light_magenta(" command to return to your stream.\n")
+ guide += light_magenta("Type ") + \
+ light_green("h stream") + \
+ light_magenta(" for more details.")
+ printNicely(guide)
+ sys.stdout.write(g['decorated_name'](c['PREFIX']))
+ sys.stdout.flush()
elif tweet is Hangup:
printNicely("-- Hangup --")
elif tweet.get('text'):
import os.path
# Bumped version
-version = '0.7.3'
+version = '0.7.4'
# Require
install_requires = [