mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-10-28 04:44:11 -07:00
9254956775
all menus (except the last one) use rofi menu additionally all anime's selected in a search or episodes selected to watch will be inserted into a local sqlite3 database [history.sqlite3]
34 lines
685 B
Bash
Executable File
34 lines
685 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
DB='history.sqlite3'
|
|
|
|
while getopts 'cdr' OPT; do
|
|
case "$OPT" in
|
|
c)
|
|
printf "%s\n" "Creating database..."
|
|
sqlite3 "$DB" <sql/anime_search_history.sql
|
|
sqlite3 "$DB" <sql/watch_history.sql
|
|
printf "%s\n" "Created database..."
|
|
;;
|
|
d)
|
|
printf "%s\n" "Deleting database..."
|
|
rm -rf "$DB"
|
|
printf "%s\n" "Database deleted..."
|
|
;;
|
|
|
|
r)
|
|
printf "%s\n" "Deleting database..."
|
|
rm -rf "$DB"
|
|
printf "%s\n" "Database deleted..."
|
|
printf "%s\n" "Creating database..."
|
|
sqlite3 "$DB" <sql/anime_search_history.sql
|
|
sqlite3 "$DB" <sql/watch_history.sql
|
|
printf "%s\n" "Created database..."
|
|
;;
|
|
*)
|
|
printf "%s\n" "Don't get here"
|
|
exit 1
|
|
;;
|
|
esac
|
|
done
|