diff --git a/aniwrapper b/aniwrapper index 00b63fa..cc167ce 100755 --- a/aniwrapper +++ b/aniwrapper @@ -90,7 +90,7 @@ generate_span() { ######## # Main # ######## -while getopts 'vhqcdf:-:t:T:' OPT; do +while getopts 'vhqcdf:-:t:T:CQ:' OPT; do case "$OPT" in h) help_text @@ -145,6 +145,17 @@ while getopts 'vhqcdf:-:t:T:' OPT; do esac CFG_FILE="$CFG_DIR/themes/$ROFI_THEME" ;; + C) + logger "Connecting to history database -> $CFG_DIR/history.sqlite3" + sqlite3 "$CFG_DIR/history.sqlite3" + exit $? + ;; + Q) + query="$OPTARG" + logger "DATABASE QUERY: $query" + sqlite3 -line "$CFG_DIR/history.sqlite3" "$query" + exit $? + ;; T) CFG_FILE="$OPTARG" [ ! -f "$CFG_FILE" ] && seppuku "config file $CFG_FILE does not exist"