- ``QUOTE_FORMAT``: format when quote a tweet
+ ``#comment``: Your own comment about the tweet
- + ``#owner``: owner's username with '@'
+ + ``#owner``: owner's username *without* '@'
+ ``#tweet``: original tweet
+ + ``#tid``: the tweet id on Twitter
- ``THREAD_META_LEFT``: format for meta information of messages from partner which is display in the left of screen.
// 'conversation': max tweet in a thread
"CONVERSATION_MAX" : 30,
// 'quote' format
- "QUOTE_FORMAT" : "#comment RT #owner: #tweet",
+ "QUOTE_FORMAT" : "#comment https:\/\/twitter.com\/#owner\/status\/#tid",
// 'thread' meta format
"THREAD_META_LEFT" : "(#id) #clock",
"THREAD_META_RIGHT" : "#clock (#id)",
Quoting format
"""
# Retrieve info
- screen_name = '@' + tweet['user']['screen_name']
- text = tweet['text']
+ screen_name = str( tweet['user']['screen_name'] )
+ text = str( tweet['text'] )
+ tid = str( tweet['id'] )
+
# Validate quote format
if '#owner' not in c['QUOTE_FORMAT']:
printNicely(light_magenta('Quote should contains #owner'))
if '#comment' not in c['QUOTE_FORMAT']:
printNicely(light_magenta('Quote format should have #comment'))
return False
+
# Build formater
formater = ''
try:
formater = c['QUOTE_FORMAT']
- formater = screen_name.join(formater.split('#owner'))
- formater = text.join(formater.split('#tweet'))
+
+ formater = formater.replace('#owner', screen_name)
+ formater = formater.replace('#tweet', text)
+ formater = formater.replace('#tid', tid)
+
formater = emojize(formater)
except:
pass