updated
[pauldeden-misc.git] / mindmaps
blobb32376e6c66fcff9c550d51880ac51d88494cf45
1 #!/usr/bin/python
2 #
3 # Author: Paul D. Eden <paul@benchline.org>
4 # Distributed under the terms of the Gnu public license version 2
5 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
6 #
7 # Simple script to keep track of my mindmaps
8 # stores to a local git repo and syncs with Amazon S3
10 import os
11 import subprocess
13 def run(cmd):
14 subprocess.check_call(cmd, shell=True)
16 def runbool(cmd):
17 ret = subprocess.call(cmd, shell=True)
18 return ret == 0
20 def update_mindmaps(sync_w_s3=True):
21 os.chdir("/home/paul/Desktop/mm")
22 run("git add *")
23 run("git commit -a")
24 if sync_w_s3:
25 run("s3cmd sync . s3://pe_mindmaps")
27 if __name__ == "__main__":
28 update_mindmaps()