Run with "review" ($0 review), and you will get a rundown of complete and incomplete tasks for the week.
Run with "review" ($0 review), and you will get a rundown of complete and incomplete tasks for the week.
Optionally, supply with date-compatible strings as "$0 review <start> [end] to use a range, end defaults to yesterday
Optionally, supply with date-compatible strings as "$0 review <start> [end] to use a range, end defaults to yesterday
A task is considered complete if it matches the regex /^ \*/ and incomplete matching /* \-/
A task is considered complete if it matches the regex /^ \*/ and incomplete matching /* \-/
events are also printed, assuming ! below
I've also implemented /^ ~/, implying a continuing task (as opposed to - which I'm sort of considering "not only incomplete, but barely progressed/attempted").
For the purposes of review, ~ counts as Completed.
I'm hoping to capture which tasks are is under-estimated.
Events are also printed, assuming ! below
Notes are generally ignored, but can be started with "^ #", "^ ;", or "^ !" for future functionality
Notes are generally ignored, but can be started with "^ #", "^ ;", or "^ !" for future functionality
This will evolve with use, but generally (and in order of importance)
This will evolve with use, but generally (and in order of importance)
if [ "$DATE_ARGS" == '' ]; then DATE_ARGS='%A %d %B %Y'; fi
if [ "$DATE_ARGS" == '' ]; then DATE_ARGS='%A %d %B %Y'; fi
debug "From static template with DATE_ARGS=$DATE_ARGS"
debug "From static template with DATE_ARGS=$DATE_ARGS"
sed 's/{{DATE[^}]*}}/$(date "+$DATE_ARGS" -d ${!i})/g' $CLDIR/template > $CLDIR/${!i}
sed "s/{{DATE[^}]*}}/$(date "+$DATE_ARGS" -d ${!i})/g" $CLDIR/template > $CLDIR/${!i}
else
else
echo -e "$(date "+%A %d %B %Y" -d ${!i})\nWhat do you want to accomplish today?\n\nWhat are your notes for today?\n\nWhat do you need to follow up tomorrow?\n" > "$CLDIR/${!i}"
echo -e "$(date "+%A %d %B %Y" -d ${!i})\nWhat do you want to accomplish today?\n\nWhat are your notes for today?\n\nWhat do you need to follow up tomorrow?\n" > "$CLDIR/${!i}"
fi
fi
@ -157,7 +170,7 @@ function captains_log() {
if ! grep -qE "^Scheduled to Review today:" "$CLDIR/${!i}"; then
if ! grep -qE "^Scheduled to Review today:" "$CLDIR/${!i}"; then
echo "Scheduled to Review today:" >> "$CLDIR/${!i}"
echo "Scheduled to Review today:" >> "$CLDIR/${!i}"
fi
fi
if ! grep -qE "^ - $TASK" "$CLDIR/${!i}";then
if ! grep -qE "^ . $TASK" "$CLDIR/${!i}";then
echo " - $TASK" >> "$CLDIR/${!i}"
echo " - $TASK" >> "$CLDIR/${!i}"
fi
fi
@ -181,6 +194,14 @@ function captains_log() {
vi -O $CLDIR/{$YESTERDAY,$TODAY,$TOMORROW}
vi -O $CLDIR/{$YESTERDAY,$TODAY,$TOMORROW}
if [ $GIT ]; then
if [ $( git -C "$CLDIR" status -s |wc -l) -ne 0 ]; then
git -C "$CLDIR" add -A
git -C "$CLDIR" commit -m "Audo-Commit by $(basename $0)"