<reponame>mpinkerman/TBot
#!/usr/bin/env python
# -*- coding: utf-8 -*-


# If you haven't changed credentials.py yet with your own Twitter
# account settings, this script will tweet at twitter.com/@CSCC_Linux_Bot

# This bot tweets a text file line by line, waiting a
# given period of time between tweets.

# Download a Project Gutenberg "Plain Text UTF-8" file,
# open it in Notepad, remove junk at beginning,
# and replace all double-linebreaks with single linebreaks.


# Housekeeping: do not edit
import tweepy, time
from credentials import *
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_TOKEN, ACCESS_SECRET)
api = tweepy.API(auth)


# What the bot will tweet
filename = open('data/dorian_grey.txt', 'r')
tweet_text = filename.readlines()
filename.close()

# loop through the tweet_text
for line in tweet_text[0:5]: # Will only write first 5 lines
    api.update_status(status=line)
    print(line)
    time.sleep(15) # Sleep for 15 seconds

print("All done!")
#!/usr/bin/env python
# -*- coding: utf-8 -*-


# If you haven't changed credentials.py yet with your own Twitter
# account settings, this script will tweet at twitter.com/@CSCC_Linux_Bot

# This bot tweets a text file line by line, waiting a
# given period of time between tweets.

# Download a Project Gutenberg "Plain Text UTF-8" file,
# open it in Notepad, remove junk at beginning,
# and replace all double-linebreaks with single linebreaks.


# Housekeeping: do not edit
import tweepy, time
from credentials import *
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_TOKEN, ACCESS_SECRET)
api = tweepy.API(auth)


# What the bot will tweet
filename = open('data/dorian_grey.txt', 'r')
tweet_text = filename.readlines()
filename.close()

# loop through the tweet_text
for line in tweet_text[0:5]: # Will only write first 5 lines
    api.update_status(status=line)
    print(line)
    time.sleep(15) # Sleep for 15 seconds

print("All done!")
#!/usr/bin/env python # -*- coding: utf-8 -*- # If you haven't changed credentials.py yet with your own Twitter # account settings, this script will tweet at twitter.com/@CSCC_Linux_Bot # This bot tweets a text file line by line, waiting a # given period of time between tweets. # Download a Project Gutenberg "Plain Text UTF-8" file, # open it in Notepad, remove junk at beginning, # and replace all double-linebreaks with single linebreaks. # Housekeeping: do not edit # What the bot will tweet # loop through the tweet_text # Will only write first 5 lines # Sleep for 15 seconds