Revisions
-
wbsch revised this gist
Apr 5, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ # Inspired by https://gist.github.com/Unode/9366218 # # Works with any Taskwarrior version that supports hooks. # Needs Taskwarrior 2.4.3 in order to show fancy commit messages. # # NOTE: Little to no error handling. This is a PoC, remember? @@ -19,8 +19,8 @@ TASK_DIR = os.path.dirname(__file__) + os.sep + os.pardir c = {} if len(sys.argv) > 1: c = {k:v for k, v in (s.split(":", 1) for s in sys.argv[1:])} if 'args' not in c: c['args'] = "Taskwarrior version too old, no info available." -
wbsch revised this gist
Mar 29, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ c = {k:v for k, v in (s.split(":", 1) for s in sys.argv[2:])} if 'args' not in c: c['args'] = "Taskwarrior version too old, no info available." os.chdir(TASK_DIR) -
wbsch revised this gist
Mar 28, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -32,7 +32,7 @@ with open(".gitignore", "w") as f: f.write("*\n") subprocess.call("git add -f .gitignore pending.data completed.data".split()) subprocess.call(["git", "commit", "-mInitial log"]) if subprocess.call("git diff --exit-code --quiet".split()) != 0: subprocess.call("git commit -a".split() + ["-m" + c['args']]) -
wbsch revised this gist
Mar 28, 2015 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,10 +2,13 @@ # # PoC: Manage a git repository in ~/.task that gets updated on changes. # Only pending.data and completed.data are included by default. # You can use "git add" to add whatever files you want to track in your # task folder. # # Inspired by https://gist.github.com/Unode/9366218 # # Works with any Taskwarrior version that supports hooks. # Needs Taskwarrior-NOT_PUBLIC_YET in order to show fancy commit messages. # # NOTE: Little to no error handling. This is a PoC, remember? -
wbsch revised this gist
Mar 28, 2015 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -19,6 +19,9 @@ if len(sys.argv) > 2: c = {k:v for k, v in (s.split(":", 1) for s in sys.argv[2:])} if 'args' not in c: args['c'] = "Taskwarrior version too old, no info available." os.chdir(TASK_DIR) if not os.path.isdir(TASK_DIR + os.sep + ".git"): -
wbsch created this gist
Mar 28, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ #!/usr/bin/env python # # PoC: Manage a git repository in ~/.task that gets updated on changes. # Only pending.data and completed.data are included by default. # # Inspired by https://gist.github.com/Unode/9366218 # # Needs Taskwarrior-NOT_PUBLIC_YET in order to work. # # NOTE: Little to no error handling. This is a PoC, remember? import os import subprocess import sys TASK_DIR = os.path.dirname(__file__) + os.sep + os.pardir c = {} if len(sys.argv) > 2: c = {k:v for k, v in (s.split(":", 1) for s in sys.argv[2:])} os.chdir(TASK_DIR) if not os.path.isdir(TASK_DIR + os.sep + ".git"): subprocess.call("git init".split()) with open(".gitignore", "w") as f: f.write("*\n") subprocess.call("git add -f .gitignore pending.data completed.data".split()) subprocess.call(["git", "commit", "-m'Initial log'"]) if subprocess.call("git diff --exit-code --quiet".split()) != 0: subprocess.call("git commit -a".split() + ["-m'" + c['args'].replace("'", "") + "'"])