Created
March 12, 2014 05:56
-
-
Save jonmorehouse/9501627 to your computer and use it in GitHub Desktop.
Backlog manager for daily file management
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
function backlog { | |
# assumes you are in the backlog directory | |
# create file contents as needed | |
# link readme each day - easy github management | |
# create proper commit message | |
file=$(date | awk '{ print tolower($1)"-"tolower($2)"-"$3 }') | |
file_path=current/$file.md | |
# generate file contents | |
date_message=$(date | awk '{ print $1" "$2" "$3 }') | |
message="$date_message\n" | |
for i in {0..${#date_message}} | |
do | |
message="$message=" | |
done | |
message="$message\n\nTodo\n====\n\n\n\nCompleted\n========\n\n" | |
# upload file structure as needed | |
if [[ ! -f $file_path ]] | |
then | |
echo -e $message > $file_path | |
ln -f -s $file_path README.md | |
# now add the files and commit as needed | |
git add --all | |
git commit -m $date_message -a | |
fi | |
# now open the file in the editor | |
$EDITOR $file_path | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would be interesting to parse yesterday's file and grab everything that wasn't finished and push it into todays "todo"