finish dotodays command, update README

This commit is contained in:
Yargo 2022-09-14 15:38:42 +02:00
parent 93e138a41f
commit faef670f8b
2 changed files with 37 additions and 9 deletions

View File

@ -54,6 +54,10 @@ then also the configuration can be displayed by entering `c`.
- `k` : define target kanban file (for direct edition, and new items)
- `f` F : define filter word F as grep pattern for selection of cards
(empty is changed into `.` which matches all non-empty cards)
- `p` : show planning (time scheduling) for active ("doing") cards
- `u` N U.U [[YY]MMDD] : update scheduling for card N with new expected
duration U.U and optional new target date
- `t` : put waiting cards with target of today or older into doing state
- `ek` : directly edit the target kanban file with the text editor
- `ec` : directly edit the configuration file with the text editor
- `!` : execute arguments with shell, `/bin/sh -c` by default
@ -96,6 +100,25 @@ filling of the screen with calendar entries when using any of the
In addition, the `d` command will sort the output cards according
to the configuration variable `sortdir` (see below).
The `p/u/t` commands use special syntax ` @YYMMDD/U.U` in cards,
denominating the target date `YYMMDD` and the expected duration `U.U`
with special values defined in the configuration file:
- `planunit` is just an informative string, by default "h/day"
- `tunits` is number of units (e.g hours) available per day
- `planpart` is percentage of "tunits" which may be distributed
The `p` command calculates which amount per active card having a
target date and duration should be attributed to its task so that
it can be finished before the target date.
The `u` command permits to set a (new) expected duration and optionally
a target date for a card.
The `t` command scans all "waiting" cards with a target date and
duration and puts them into the doing state, if the target date
is today or already passed.
The `!` "shell escape" command will allow you to execute shell commands.
If the command begins with a letter and does not match to an internal
clikan command, you may even omit the leading `!` -- so be careful:
@ -279,4 +302,4 @@ by manually removing the entries marked with a `+` flag through the
---
*2020-05-11/HB9KNS,Y.Bonetti*
*2022-09-14/HB9KNS,Y.Bonetti*

View File

@ -1,6 +1,6 @@
#!/bin/sh
# clikan.sh -- CLI Kanban
ver='2022-09-08/HB9KNS'
ver='2022-09-14/HB9KNS'
conf="${CLIKANCONF:-$HOME/.clikanconf}"
defkanban="$HOME/clikanban.md"
@ -209,11 +209,16 @@ dotodays(){
cat $kbs | getlines - | { while read cl
do
edate=`getsdate "$cl"`
echo ::::: $cl ::::: $edate
# if date field exists and is lessequal than today
if test -n "$edate" -a "$edate" -le "$stoday"
# only process lines with date field
if test X$edate != X
then
# (if-thens splitted due to impossible "-le" comparison if edate is empty)
# if today or earlier
if test $edate -le $stoday
# save kanban entry for later
then echo "$cl" >> $buff
then echo "$cl" >> $buff
echo ": now doing $cl"
fi
fi
done
# if at least one entry was saved
@ -259,10 +264,10 @@ command keys:
f F: filter for grep pattern F (case insensitive, empty='.', use _ for space)
p: show planning (time scheduling) for active (doing) cards containing
@YYMMDD/U.U target date (YYMMDD) and expected duration (U.U)
t: put waiting cards with target date of today or older into doing state
h N U.U [[YY]MMDD]: update expected duration for card N and
u N U.U [[YY]MMDD]: update expected duration for card N and
optionally set new target date [YY]MMDD
(asks for date if card is missing @YYMMDD)
t: put waiting cards with target date of today or older into doing state
ec: directly edit config file -- DANGER!
ek: directly edit kanban file -- DANGER!
!: execute arguments with "$myshell"
@ -433,7 +438,7 @@ p) echo "## planning for $planpart% of $tunits $planunit"
done
}
;;
h) if test "$coa1" = ""
u) if test "$coa1" = ""
then echo "card number?"
read coa1
fi