HowToTweetEveryCommit
have you ever wanted to lose all of your followers by tweeting every single commit message to the world?
adapted from: https://gist.github.com/kylefrost/f3841e76749dc64f4b5e
changed to do the actual twitter post in python using Tweepy because the oauth-sign and http-post install from tar.gz was giving me problems and python is just easier. hopefully this makes it a bit more usable for someone else. enjoy!
Get To Tweeting
- Get your developer tokens from https://apps.twitter.com/ and make sure your permissions are set to "Read and Write"

- Fill out the
.profiles.inifile with as many different twitter account keys as you would like.
[default]
CONSUMER_KEY=your_key
CONSUMER_SECRET=my_secret_key
ACCESS_TOKEN=my_token
ACCESS_TOKEN_SECRET=my_secret_token
[kevindurantactual]
CONSUMER_KEY=your_key
CONSUMER_SECRET=my_secret_key
ACCESS_TOKEN=my_token
ACCESS_TOKEN_SECRET=my_secret_token
[kevindurantfanacct]
CONSUMER_KEY=your_key
CONSUMER_SECRET=my_secret_key
ACCESS_TOKEN=my_token
ACCESS_TOKEN_SECRET=my_secret_token
-
run
pip install -r requirements.txtto install dependencies (its justtweepyandconfigparser), -
Run
python start_tweeting.py defaultto tweet from the account associated with the keys listed underdefaultin.profiles.ini -
When prompted select the folder of the repository you are interested in tweeting out commits for.
-
Watch as all your fake friends unfollow you.
Verify it Worked
- Go to the local repository that you selected to tweet from and find the
.gitfolder. Note that most operating systems have folders that start with "." hidden. To unhide folders on Mac OSX pressCommand+Shift+.
-
Look for 2 files named
post-commitandpost_commit_hook_autogen.pyin the repository's git hooks directory:your_repo/.git/hooks/ -
Open the
post_commit_hook_autogen.pyfile and verify that the Twitter API credentials you supplied are present in the config dictionary.
def main():
"""
Get these values from https://apps.twitter.com/
See more detailed instructions in the README.md
"""
cfg = {
"consumer_key" : "some-random-str-thing",
"consumer_secret" : "and-another-one-but-secretive",
"access_token" : "a-long-string-too",
"access_token_secret" : "a-secretive-long-string"
}When You Get Tired or Your Follower Count Goes Down to 0
Run the following command:
bash stop_tweeting.sh
Supply the path to the repository that you had previously tweeted from.
Contributing
Its still pretty early but if you have suggestions, thoughts, feedback, criticism, etc feel free to open a PR or submit an Issue.
Thanks in advance 😊
Donating
If ya feeling generous, hollr @ the kid ❤️
https://patreon.com/andcomputers
BTC: 3EbMygEoo8gqgPHxmqa631ZVSwgWaoCj3m
ETH: 0x2F2604AA943dB4E7257636793F38dD3B1808A9e7
LTC: MQVgzNDgw43YzyUg3XmH3jQ7L8ndVswmN3

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

