Skip to content

Instantly share code, notes, and snippets.

@jonmorehouse
Created March 12, 2014 05:56
Show Gist options
  • Save jonmorehouse/9501627 to your computer and use it in GitHub Desktop.
Save jonmorehouse/9501627 to your computer and use it in GitHub Desktop.
Backlog manager for daily file management
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
}
@jonmorehouse
Copy link
Author

Would be interesting to parse yesterday's file and grab everything that wasn't finished and push it into todays "todo"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment