bkeep

book management software
git clone git://git.benoneill.xyz/bkeep
Log | Files | Refs | README | LICENSE

commit bca9a35785d9223a92da731cb5b22164ba0a68f1
parent b2ba2b526a247fc42537813bc8422ee41551aec9
Author: Ben O'Neill <ben@benoneill.xyz>
Date:   Sun, 29 Dec 2019 14:22:22 -0500

Start work on curses interface using dialog(1)

Diffstat:
Abkeep_curses | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/bkeep_curses b/bkeep_curses @@ -0,0 +1,17 @@ +#!/bin/sh + +add() { \ + TITLE="$(dialog --title "bkeep" --inputbox "Please enter the title of the book." 10 60 3>&1 1>&2 2>&3 3>&1)" || exit + AUTHOR="$(dialog --title "bkeep" --inputbox "Please enter the author of the book." 10 60 3>&1 1>&2 2>&3 3>&1)" || exit + DESCRIPTION="$(dialog --title "bkeep" --inputbox "Please enter a short description of the book." 10 60 3>&1 1>&2 2>&3 3>&1)" || exit + ISBN="$(dialog --title "bkeep" --inputbox "Please enter the ISBN of the book." 10 60 3>&1 1>&2 2>&3 3>&1)" || exit + TAGS="$(dialog --title "bkeep" --inputbox "Please enter some comma-separated tags for the book." 10 60 3>&1 1>&2 2>&3 3>&1)" || exit + bkeep a "$TITLE" "$AUTHOR" "$DESCRIPTION" "$ISBN" "$TAGS" +} + +res="$(dialog --title "bkeep" --menu "What would you like to do" 10 70 2 Add "Add a new book" Cite "Generate a citation for a book" Edit "Modify an entry" Grep "Find an entry through a regex query" List "List all books" Remove "Remove a book by ID" 3>&1 1>&2 2>&3 3>&1)" + +case "$res" in + "Add") add ;; + *) echo "Invalid response" ;; +esac