Created
June 28, 2013 12:33
-
-
Save aoshiman/5884339 to your computer and use it in GitHub Desktop.
Tweet via CUI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from tweepy import API, OAuthHandler | |
from pit import Pit | |
def main(post): | |
"""Function for OAuth Setting and Tweet""" | |
cconf = Pit.get('oauth_conf') | |
auth = OAuthHandler(cconf['consumer_key'], cconf['consumer_secret']) | |
aconf = Pit.get('access_aoshiman') | |
auth.set_access_token(aconf['access_token'], aconf['access_secret']) | |
api = API(auth) | |
#print post | |
api.update_status(post) | |
if __name__ == '__main__': | |
import sys | |
main(unicode(' '.join(sys.argv[1:]), 'utf-8')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment