t = Twitter(auth=authen())
try:
id = int(g['stuff'].split()[0])
+ tid = c['tweet_dict'][id]
except:
- printNicely(red('Sorry I can\'t understand.'))
+ printNicely(red('Tweet id is not valid.'))
return
- tid = c['tweet_dict'][id]
tweet = t.statuses.show(id=tid)
url = 'https://twitter.com/' + \
tweet['user']['screen_name'] + '/status/' + str(tid)
- os.system("echo '%s' | pbcopy" % url)
- printNicely(green('Copied tweet\'s url to clipboard.'))
+ import platform
+ if platform.system().lower() == 'darwin':
+ os.system("echo '%s' | pbcopy" % url)
+ printNicely(green('Copied tweet\'s url to clipboard.'))
+ else:
+ printNicely('Direct link: ' + yellow(url))
def delete():
owner_screen_name=owner,
count=c['LIST_MAX'],
include_entities=False)
- for tweet in res:
+ for tweet in reversed(res):
draw(t=tweet)
printNicely('')
light_green('ufav 12 ') + ' will unfavorite tweet with ' + \
light_yellow('[id=12]') + '.\n'
usage += s * 2 + \
- light_green('share 12 ') + ' will copy the url of the tweet with ' + \
- light_yellow('[id=12]') + ' to your clipboard.\n'
+ light_green('share 12 ') + ' will get the direct link of the tweet with ' + \
+ light_yellow('[id=12]') + '.\n'
usage += s * 2 + \
light_green('del 12 ') + ' will delete tweet with ' + \
light_yellow('[id=12]') + '.\n'