'--image-on-term',
action='store_true',
help='Display all image on terminal.')
+ parser.add_argument(
+ '-24',
+ '--color-24bit',
+ action='store_true',
+ help='Display images using 24bit color codes.')
+ parser.add_argument(
+ '-hr',
+ '--higher-resolution',
+ action='store_true',
+ help='Display images in high(er) resolution.')
parser.add_argument(
'-ph',
'--proxy-host',
# Image on term
c['IMAGE_ON_TERM'] = args.image_on_term
set_config('IMAGE_ON_TERM', str(c['IMAGE_ON_TERM']))
+ # Use 24 bit color
+ c['24BIT'] = args.color_24bit
+ # Print images using half height blocks
+ c['HIGHER_RESOLUTION'] = args.higher_resolution
+ set_config('HIGHER_RESOLUTION', str(c['HIGHER_RESOLUTION']))
# Check type of ONLY_LIST and IGNORE_LIST
if not isinstance(c['ONLY_LIST'], list):
printNicely(red('ONLY_LIST is not a valid list value.'))
original_tweet = t.statuses.show(id=tid)
text = original_tweet['text']
nick_ary = [original_tweet['user']['screen_name']]
- for user in tweet['entities']['user_mentions']:
- if user['screen_name'] not in nick_ary:
+ for user in list(original_tweet['entities']['user_mentions']):
+ if user['screen_name'] not in nick_ary \
+ and user['screen_name'] != g['original_name']:
nick_ary.append(user['screen_name'])
- if g['original_name'] in nick_ary:
- nick_ary.remove(g['original_name'])
status = ' '.join(g['stuff'].split()[1:])
status = ' '.join(['@' + nick for nick in nick_ary]) + ' ' + str2u(status)
t.statuses.update(status=status, in_reply_to_status_id=tid)
return
# Kill old thread
g['stream_stop'] = True
- try:
+ try:
stuff = g['stuff'].split()[1]
except:
stuff = None
detail_twitter_error(e)
sys.stdout.write(g['decorated_name'](g['PREFIX']))
sys.stdout.flush()
- except (URLError, ConnectionResetError):
+ except (URLError):
printNicely(
magenta('There seems to be a connection problem.'))
save_history()