-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completed Twitter Quote Bot #15
base: master
Are you sure you want to change the base?
Conversation
textList.append(tweet.text) | ||
for text in textList: | ||
if text[0] == 'R': | ||
cleaned = (text.split(':')[1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming this has something to do with the specifics of how the Twitter package/api formats things, but this could use a little documentation I think.
GetTweets.py
Outdated
|
||
|
||
|
||
# print (getTweets()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally we want to remove commented code and multiple trailing newlines.
Pickling.py
Outdated
def PickleBuddy(): | ||
files = os.listdir(filePath) # make a list of all the files that already exist | ||
if not "cachedData.pickle" in files: | ||
api = twitter.Api(consumer_key=CONSUMER_KEY, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proper usage, props for that. Though, it might be a little more clear to clarify that these come from TwitterKeys - e.g. TwitterKeys.CONSUMER_KEY.
That's just a style thing though, personal preference and such.
# Returns the contents of the file, split into a list of words and | ||
# (some) punctuation. | ||
def wordlist(words): | ||
# f = open(filename, 'r') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Often it's better to open and close files as-needed, avoiding this kind of commenting /uncommenting while developing.
I uploaded everything in time but I forgot to submit a pull request the day of. Sorry!