Browse Source

implementing + for unplanned tasks

master
Ben Savage 4 years ago
parent
commit
c70aa389a5
  1. 11
      cl

11
cl

@ -30,6 +30,7 @@ $0 - Captain's log
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.
Create a file in "$CLDIR" named "backlog", and it will be opened along with the other daily files, split under "tomorrow"
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
@ -38,6 +39,8 @@ $0 - Captain's log
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
A task is considered complete if it matches the regex /^ \*/ and incomplete matching /* \-/
Also considering + to mean "a task that was not planned, but popped up during the course of the day".
For the purposes of review it counts as incomplete, unless prefixed with \*
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.
@ -75,17 +78,17 @@ function review() {
for j in '*|~' '-' '!' ; do
for j in '\*|~' '-|\+' '!' ; do
case $j in
\*|\~) echo "Completed Tasks:";;
\-) echo "Incomplete Tasks:";;
\\*\|\~) echo "Completed Tasks:";;
\-\|\\+) echo "Incomplete Tasks:";;
\!) echo "Events:";;
esac
for i in ${DATES[@]} ; do
if [ -f "$CLDIR/$i" ]; then
T="$(grep -E "^ \\$j" "$CLDIR/$i")"
T="$(grep -P "^\s($j\s)" "$CLDIR/$i")"
if [ "$T" != "" ]; then
echo -n " ";date "+%A %d %B %Y" -d "$i"
echo "$T"|sed "s/^/\t/"

Loading…
Cancel
Save