Browse Source

Improve help for grocery_transactions.sh

Daniel Sheffield 3 years ago
parent
commit
e001f0b76b
1 changed files with 8 additions and 5 deletions
  1. 8 5
      grocery_transactions.sh

+ 8 - 5
grocery_transactions.sh

@@ -33,20 +33,23 @@ done
 
 usage(){
     cat <<EOF
-Usage: ./${0##*/} DATE STORE [ ROLLBACK | COMMIT ]
+Usage: ./${0##*/} [ -d DATE ] [ -s STORE ] [ -r | -c ] < transactions.txn
  
 Companion script for grocery_transactions.py
 
 Reads transactions from stdin.
-ROLLBACK enabled by default
+ROLLBACK (-r) is enabled by default
+Date is optional and by default is set to current day.
+Date and store only affect the display of the transactions.
+If store is not set, then all stores are shown for that day.
 
 Example:
     # load generated transactions with ROLLBACK
-    ./${0##*/} < transactions.txn
-    ./${0##*/} ROLLBACK < transactions.txn
+    ./${0##*/} -d DATE -s STORE < transactions.txn
+    ./${0##*/} -d DATE -s STORE -r < transactions.txn
     
     # load generated transactions with COMMIT
-    ./${0##*/} COMMIT < transactions.txn
+    ./${0##*/} -d DATE -s STORE -c < transactions.txn
 EOF
 }
 if [[ -t 0 ]]