"""
Quote a tweet
"""
+ # Get tweet
t = Twitter(auth=authen())
try:
id = int(g['stuff'].split()[0])
return
tid = c['tweet_dict'][id]
tweet = t.statuses.show(id=tid)
- screen_name = tweet['user']['screen_name']
- text = tweet['text']
- quote = '\"@' + screen_name + ': ' + text + '\"'
- quote = quote.encode('utf8')
- notice = light_magenta('Compose mode ')
- notice += light_yellow('(Enter nothing will cancel the quote)')
- notice += light_magenta(':')
- printNicely(notice)
- extra = raw_input(quote)
- if extra:
- t.statuses.update(status=quote + extra)
+ # Get formater
+ formater = format_quote(tweet)
+ if not formater:
+ return
+ # Get comment
+ prefix = light_magenta('Compose your ') + light_green('#comment: ')
+ comment = raw_input(prefix)
+ if comment:
+ quote = comment.join(formater.split('#comment'))
+ t.statuses.update(status=quote)
else:
printNicely(light_magenta('No text added.'))
tid = c['tweet_dict'][id]
user = t.statuses.show(id=tid)['user']['screen_name']
status = ' '.join(g['stuff'].split()[1:])
- status = '@' + user + ' ' + unc(status)
+ status = '@' + user + ' ' + str2u(status)
t.statuses.update(status=status, in_reply_to_status_id=tid)
"""
Delete a list
"""
- slug = raw_input(light_magenta('Your list that you want to update: '))
+ slug = raw_input(light_magenta('Your list that you want to delete: '))
try:
t.lists.destroy(
slug='-'.join(slug.split()),
printNicely(guide)
sys.stdout.write(g['decorated_name'](c['PREFIX']))
sys.stdout.flush()
+ StreamLock.release()
+ break
elif tweet is Hangup:
printNicely("-- Hangup --")
elif tweet.get('text'):
draw(
t=tweet,
keyword=args.track_keywords,
+ humanize=False,
check_semaphore=True,
fil=args.filter,
ig=args.ignore,
# the 1st character of that word
if current_buffer and g['cmd'] != current_buffer:
sys.stdout.write(
- g['decorated_name'](c['PREFIX']) + unc(current_buffer))
+ g['decorated_name'](c['PREFIX']) + str2u(current_buffer))
sys.stdout.flush()
elif not c['HIDE_PROMPT']:
sys.stdout.write(g['decorated_name'](c['PREFIX']))