├── day_one_git_messages.sh ├── local.git2dayone.plist └── readme.md /day_one_git_messages.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | repos='path/to/repo1 /path/to/repo2 ...' 3 | 4 | for repoPath in $repos 5 | do 6 | cd $repoPath 7 | logs=`git log --since=6am` 8 | if [ -n "$logs" ]; then 9 | echo "Found logs @ $repoPath" 10 | echo "Commits for $repoPath\\n $logs" | dayone -d="today" new 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /local.git2dayone.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Label 6 | local.git2dayone 7 | OnDemand 8 | 9 | RunAtLoad 10 | 11 | UserName 12 | USERNAME 13 | Program 14 | PATH/TO/day_one_git_messages.sh 15 | StartCalendarInterval 16 | 17 | Hour 18 | 06 19 | Minute 20 | 00 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ## Git Commit Logs For Day One 2 | 3 | Steps: 4 | 5 | 1. Install the [dayone CLI](http://dayoneapp.com/tools/cli-man/) tool. 6 | 2. Put `day_one_git_messages.sh` somewhere permanent in your file system. 7 | For example, `$HOME/bin/` 8 | 3. Edit `local.git2dayone.plist`. Replace `USERNAME` and 9 | `PATH/TO/day_one_git_messages.sh` with your system username and the 10 | path from step 2. Optionally, specify the hour of and minute of the 11 | day you'd like the script to run (default at 06:00). 12 | 4. mv `local.git2dayone.plist` to `$HOME/Library/LaunchAgents/`. 13 | --------------------------------------------------------------------------------