diff --git a/README.md b/README.md index 2ca851d..f4b006f 100644 --- a/README.md +++ b/README.md @@ -16,18 +16,20 @@ - [Introduction](#introduction) - [Setup](#setup) - [Dependencies](#dependencies) - - [Arch Linux](#arch-linux) - [Installing](#installing) - - [`aniwrapper` Menus](#aniwrapper-menus) - - [Search Anime](#search-anime) - - [Anime Selection](#anime-selection) - - [Episode Selection](#episode-selection) + - [Arch Linux](#arch-linux) + - [Manual Install](#manual-install) +- [Aniwrapper Menus](#aniwrapper-menus) + - [Search Anime](#search-anime) + - [Anime Selection](#anime-selection) + - [Episode Selection](#episode-selection) - [Usage](#usage) - [aniwrapper](#aniwrapper) - [Option 1: Streaming](#option-1-streaming) - [Option 2: Download](#option-2-download) - [Option 3: Continue](#option-3-continue) - [Option 4: Playlist](#option-4-playlist) + - [Option 5: Sync History](#option-5-sync-history) - [ani-cli Script](#ani-cli-script) - [Screenshots](#screenshots) @@ -72,41 +74,57 @@ These are the minimum dependences required to run `aniwrapper` - meh.rasi (installed in setup.sh) - sqlite3 +## Installing + ### Arch Linux +`aniwrapper-git` is available on the AUR for Arch users + +```sh +paru -S aniwrapper-git +or +yay -S aniwrapper-git +``` + +### Manual Install + +To install manually, make sure the dependencies are installed first + +The folowing command can be used on Arch Linux to ensure the prereqisites are installed + ```sh pacman -S --needed grep curl sed mpv ffmpeg rofi sqlite3 ``` -## Installing +Next, clone the Git repository and switch directories into the cloned repo ```sh git clone https://github.com/ksyasuda/aniwrapper cd aniwrapper ``` -After cloning and switching into the `aniwrapper` directory, run the following commands to set up and install the script +After switching into the `aniwrapper` directory, run the following commands to set up and install the script ```sh chmod +x setup.sh ./setup.sh && sudo make install ``` -## `aniwrapper` Menus +# Aniwrapper Menus There are several menus used to drive the program forward -### Search Anime +## Search Anime The first menu consists of a search box and a list of anime titles corresponding to past valid searches. Choose an option from the menu, or enter in a unique search query to search for a new anime. The result from this will be used to query against `gogoanime` and return similar named anime -### Anime Selection +## Anime Selection The next menu is where you select the anime to watch from a narrowed down list. Elements that have a blue border and text color indicate which anime have been watched before - _In the future, I'd like to make it so if you select an option from the list of previously searched anime, then it will skip this and go on to episode selection_ -### Episode Selection +## Episode Selection In the episode selection menu, you can select an individual episode from the list, provide a single episode, or provide a range of episodes as two space separated integers `start_episode end_episode`. Like in the previous menu, any element with a blue border and text-color indicates that episode has been watched before diff --git a/ani-cli b/ani-cli index edcb672..b7e9e56 100755 --- a/ani-cli +++ b/ani-cli @@ -477,7 +477,8 @@ open_episode() { # s/^${selection_id}\t[0-9]+/${selection_id}\t$((episode + 1))/ # " "$logfile" >"${logfile}.new" && mv "${logfile}.new" "$logfile" - setsid -f $player_fn --http-header-fields="Referer: $dpage_url" "$video_url" >/dev/null 2>&1 + # setsid -f $player_fn --http-header-fields="Referer: $dpage_url" "$video_url" >/dev/null 2>&1 + nohup $player_fn --http-header-fields="Referer: $dpage_url" "$video_url" >/dev/null 2>&1 & else printf "Downloading episode $episode ...\n" printf "%s\n" "$video_url" diff --git a/aniwrapper b/aniwrapper index bd53ec4..fa5dc14 100755 --- a/aniwrapper +++ b/aniwrapper @@ -204,32 +204,32 @@ case "$selection" in ;; 5.) log "Sync history database" - # username=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \ - # -l 1 -p "Enter the username of the remote user:") - # if [[ -z "$username" ]] || [[ "$username" == "" ]]; then - # log "No username provided... exiting" - # exit 1 - # fi - # host=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \ - # -l 1 -p "Enter the host for the remote machine (eg 192.168.1.99):") - # if [[ -z "$host" ]] || [[ "$host" == "" ]]; then - # log "No host provided... exiting" - # exit 1 - # fi - # port=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \ - # -l 1 -p "Enter in the ssh port for remote machine or leave blank for default [22]:") - # if [[ -z "$port" ]] || [[ "$port" == "" ]]; then - # port=22 - # fi - # keypath=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \ - # -l 1 -p "Enter path to private key (leave blank if not needed or if unsure):") + username=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \ + -l 1 -p "Enter the username of the remote user:") + if [[ -z "$username" ]] || [[ "$username" == "" ]]; then + log "No username provided... exiting" + exit 1 + fi + host=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \ + -l 1 -p "Enter the host for the remote machine (eg 192.168.1.99):") + if [[ -z "$host" ]] || [[ "$host" == "" ]]; then + log "No host provided... exiting" + exit 1 + fi + port=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \ + -l 1 -p "Enter in the ssh port for remote machine or leave blank for default [22]:") + if [[ -z "$port" ]] || [[ "$port" == "" ]]; then + port=22 + fi + keypath=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \ + -l 1 -p "Enter path to private key (leave blank if not needed or if unsure):") + + if [[ -z "$keypath" ]]; then + printf "%s\n%s\n%d\n%s\n" "$username" "$host" "$port" "" | ani-cli -s + else + printf "%s\n%s\n%d\n%s\n" "$username" "$host" "$port" "$keypath" | ani-cli -s + fi - printf "%s\n%s\n%d\n%s\n" "sudacode" "sudacode" 3005 "" | ani-cli -s - # if [[ -z "$keypath" ]]; then - # printf "%s\n%s\n%d\n%s\n" "$username" "$host" "$port" "" | ani-cli -s - # else - # printf "%s\n%s\n%d\n%s\n" "$username" "$host" "$port" "$keypath" | ani-cli -s - # fi if [[ "$?" -ne 0 ]]; then log "Aniwrapper was unable to sync the databases..." exit 1