+def quote():
+ """
+ Quote a tweet
+ """
+ t = Twitter(auth=authen())
+ try:
+ id = int(g['stuff'].split()[0])
+ except:
+ printNicely(red('Sorry I can\'t understand.'))
+ return
+ tid = db.rainbow_to_tweet_query(id)[0].tweet_id
+ tweet = t.statuses.show(id=tid)
+ screen_name = tweet['user']['screen_name']
+ text = tweet['text']
+ quote = '\"@' + screen_name + ': ' + text + '\"'
+ quote = quote.encode('utf8')
+ printNicely(light_magenta('Compose mode:'))
+ extra = raw_input(quote)
+ if extra:
+ t.statuses.update(status=quote+extra)
+ else:
+ printNicely(light_magenta('No text added.'))
+
+