|
@@ -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 ]]
|