Created
June 20, 2011 16:28
-
-
Save fabiocerqueira/1035939 to your computer and use it in GitHub Desktop.
add msg aleatória nos seus commits lol
This file contains hidden or 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 -*- | |
import urllib | |
import sys | |
commit_msg = sys.argv[1] | |
with open(commit_msg, 'r+') as f: | |
try: | |
nb_commit = urllib.urlopen("http://whatthecommit.com/index.txt").read() | |
except Exception: | |
nb_commit = 'fuuuuu!!!\n\n' | |
prev_msg = f.read() | |
f.seek(0) | |
f.write(nb_commit + prev_msg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
=) Mai é fanfarrão demais! Aê Aê Aê Aê Ê Ê Ê Ê ÔôÔôÔôÔôÔô! o//