|
|
|
@ -25,7 +25,11 @@ $0 - Captain's log |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Create a file in "$CLDIR" called "template" with the base text to add to each day |
|
|
|
Create a file in "$CLDIR" called "template" with the base text to add to each day |
|
|
|
and the task will be appended to the file when it is accessed through $0 |
|
|
|
If the file is not executable, it is treated as a static template and is copied each day. |
|
|
|
|
|
|
|
The string {{DATE}} can be used to insert a date string. {{DATE <date-compatible format>}} can be used to replace the defualt format. |
|
|
|
|
|
|
|
i.e {{DATE %F}} fill produce the text $(date %F). |
|
|
|
|
|
|
|
If the file is executable, it will be run in the context of the user, and the output will be used instead. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Directories created under $BASEDIR are treated as profiles (if they exist). The default profile is assumed to be 'default'. |
|
|
|
Directories created under $BASEDIR are treated as profiles (if they exist). The default profile is assumed to be 'default'. |
|
|
|
Specify -p <profile> as the first argument to $0 to operate on a different one |
|
|
|
Specify -p <profile> as the first argument to $0 to operate on a different one |
|
|
|
@ -45,6 +49,8 @@ $0 - Captain's log |
|
|
|
; is a general note possibly worth reviewing |
|
|
|
; is a general note possibly worth reviewing |
|
|
|
# is for a verbose note, probably not of general interest but was worth noting |
|
|
|
# is for a verbose note, probably not of general interest but was worth noting |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If $CLDIR is a git repo (git rev-parse returns 0), it will be updated and auto committed unless --no-git is passed |
|
|
|
|
|
|
|
|
|
|
|
EOF |
|
|
|
EOF |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -121,7 +127,7 @@ function captains_log() { |
|
|
|
TODAY=$(date +%F) |
|
|
|
TODAY=$(date +%F) |
|
|
|
TOMORROW=$(date +%F -d "+${modT:-1} day") |
|
|
|
TOMORROW=$(date +%F -d "+${modT:-1} day") |
|
|
|
|
|
|
|
|
|
|
|
if [ ${GIT:-1} ] && [ -d "$CLDIR/.git" ]; then |
|
|
|
if [ ${GIT:-1} ] && (git -C $CLDIR rev-parse 2>/dev/null) ; then |
|
|
|
GIT=1 |
|
|
|
GIT=1 |
|
|
|
else |
|
|
|
else |
|
|
|
GIT=0 |
|
|
|
GIT=0 |
|
|
|
|