Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions config.sample
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ consumer_key:
consumer_secret:
access_token:
access_token_secret:

# Leave blank if you don't want to blacklist any users or words
[preferences]
# blacklisted_users = ['example_user_1','example_user_2']
blacklisted_users = []
# blacklisted_words = ["example_word_1", "example_word_2"]
blacklisted_words = []
7 changes: 4 additions & 3 deletions retweet.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os, ConfigParser, tweepy, inspect, hashlib
import os, ConfigParser, tweepy, inspect, hashlib, ast

path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))

Expand All @@ -14,8 +14,9 @@
tweetLanguage = config.get("settings","tweet_language")

# blacklisted users and words
userBlacklist = []
wordBlacklist = ["RT", u"♺"]
userBlacklist = ast.literal_eval(config.get("preferences", "blacklisted_users"))
wordBlacklist = ast.literal_eval(config.get("preferences", "blacklisted_words"))
wordBlacklist.extend(["RT", u"♺"])

# build savepoint path + file
hashedHashtag = hashlib.md5(hashtag).hexdigest()
Expand Down