Created
May 25, 2013 20:16
-
-
Save joelewis/5650626 to your computer and use it in GitHub Desktop.
python script to do all the commandline works for me after writing a blog post.
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
from subprocess import call | |
import sys | |
def main(): | |
if len(sys.argv) == 2: | |
call('gist ' + sys.argv[1], shell=True) | |
call('python /home/joe/Documents/workstage/joelewis/blog/utils/addone.py', shell=True) | |
call('git --git-dir=/home/joe/Documents/workstage/joelewis/.git --work-tree=/home/joe/Documents/workstage/joelewis add .',shell=True) | |
call('git --git-dir=/home/joe/Documents/workstage/joelewis/.git --work-tree=/home/joe/Documents/workstage/joelewis commit -m "+1 post"',shell=True) | |
call('git --git-dir=/home/joe/Documents/workstage/joelewis/.git --work-tree=/home/joe/Documents/workstage/joelewis push heroku master', shell=True) | |
else: | |
print "enter valid filename" | |
if __name__ =='__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment