diff --git a/README.md b/README.md index e010eec..d6f796e 100644 --- a/README.md +++ b/README.md @@ -95,10 +95,10 @@ See `justfile` for more examples - [x] ~~tui?~~ run `just new` - [x] add Update to CLI - [x] add Date to update menu. sometimes i add the session log after the session has happened! +- [x] refactor edit/update search functions +- [x] change Recent Games from 'recently created' to 'recently updated' ? - [ ] CLI flags mode -- [ ] refactor edit/update search functions - [ ] rename Update to Log or Session Log? -- [ ] change Recent Games from 'recently created' to 'recently updated' ? ## Resources diff --git a/bin/cli.sh b/bin/cli.sh index 16912d4..f6a2953 100644 --- a/bin/cli.sh +++ b/bin/cli.sh @@ -109,10 +109,15 @@ main_menu -function recent_games_update () { -count=`recsel -t Game $db -c` +function recent_updates () { +count=`recsel -t Update $db -c` recent="$((count - 7))" -recsel $db -t Game -e "Id > ${recent}" | recfmt "${gamemenutmpl}" +recsel $db \ + -t Update \ + -e "Id > ${recent}" \ + -j Game \ + -p Game_Id:Id,Game_Module:Module,Game_System:System \ + | recfmt "${gamemenutmpl}" read -p "Number> " id case $id in "" | "b" | "B" | "x" | "X" | "q" | "Q") @@ -124,7 +129,7 @@ esac -function search_games_update () { +function search_updates () { read -p "Query> " q recsel $db -t Game -i -q "${q}" | recfmt "${gamemenutmpl}" read -p "Number> " id @@ -179,9 +184,9 @@ read -p "> " menu case "$menu" in 1 | "r" | "R") - recent_games_update;; + recent_updates;; 2 | "s" | "S") - search_games_update;; + search_updates;; 3 | "m" | "M" | "q" | "Q" | "b" | "B") main_menu;; *)