pretty nice makefile i hope and update readme

This commit is contained in:
ksyasuda 2022-01-02 23:56:25 -08:00
parent 41c6e7649b
commit af1d466620
2 changed files with 55 additions and 59 deletions

View File

@ -2,29 +2,25 @@ PREFIX := /usr
all: install all: install
install: install: uninstall
cp ani-cli $(DESTDIR)$(PREFIX)/bin/ani-cli cp ani-cli $(DESTDIR)$(PREFIX)/bin/ani-cli
cp aniwrapper $(DESTDIR)$(PREFIX)/bin/aniwrapper cp aniwrapper $(DESTDIR)$(PREFIX)/bin/aniwrapper
chmod 0755 $(DESTDIR)$(PREFIX)/bin/ani-cli chmod 0755 $(DESTDIR)$(PREFIX)/bin/ani-cli
chmod 0755 $(DESTDIR)$(PREFIX)/bin/aniwrapper chmod 0755 $(DESTDIR)$(PREFIX)/bin/aniwrapper
dev: dev: uninstall
$(RM) $(DESTDIR)$(PREFIX)/bin/ani-cli ln -sr ./ani-cli $(DESTDIR)$(PREFIX)/bin/ani-cli
$(RM) $(DESTDIR)$(PREFIX)/bin/aniwrapper ln -sr ./aniwrapper $(DESTDIR)$(PREFIX)/bin/aniwrapper
ln -sr ani-cli $(DESTDIR)$(PREFIX)/bin/ani-cli
ln -sr aniwrapper $(DESTDIR)$(PREFIX)/bin/aniwrapper
uninstall: uninstall:
ifneq ("$(wildcard $(DESTDIR)$(PREFIX)/bin/ani-cli)","")
$(RM) $(DESTDIR)$(PREFIX)/bin/ani-cli $(RM) $(DESTDIR)$(PREFIX)/bin/ani-cli
endif
ifneq ("$(wildcard $(DESTDIR)$(PREFIX)/bin/aniwrapper)","")
$(RM) $(DESTDIR)$(PREFIX)/bin/aniwrapper $(RM) $(DESTDIR)$(PREFIX)/bin/aniwrapper
endif
reinstall: reinstall: uninstall install
$(RM) $(DESTDIR)$(PREFIX)/bin/ani-cli
$(RM) $(DESTDIR)$(PREFIX)/bin/aniwrapper
cp ani-cli $(DESTDIR)$(PREFIX)/bin/ani-cli
cp aniwrapper $(DESTDIR)$(PREFIX)/bin/aniwrapper
chmod 0755 $(DESTDIR)$(PREFIX)/bin/ani-cli
chmod 0755 $(DESTDIR)$(PREFIX)/bin/aniwrapper
.PHONY: all install uninstall dev reinstall .PHONY: all install uninstall dev reinstall

View File

@ -29,30 +29,30 @@ This tool scrapes the site [gogoanime](https://gogoanime.cm).
**Table of Contents** **Table of Contents**
- [Aniwrapper](#aniwrapper) - [Aniwrapper](#aniwrapper)
- [Introduction](#introduction) - [Introduction](#introduction)
- [Setup](#setup) - [Setup](#setup)
- [Skip Intro Script](#skip-intro-script) - [Skip Intro Script](#skip-intro-script)
- [Installing](#installing) - [Installing](#installing)
- [Arch Linux](#arch-linux) - [Arch Linux](#arch-linux)
- [Manual Install](#manual-install) - [Manual Install](#manual-install)
- [Install the Dependencies](#install-the-dependencies) - [Install the Dependencies](#install-the-dependencies)
- [Clone the repo](#clone-the-repo) - [Clone the repo](#clone-the-repo)
- [Run the setup and install the script](#run-the-setup-and-install-the-script) - [Run the setup and install the script](#run-the-setup-and-install-the-script)
- [Aniwrapper Menus](#aniwrapper-menus) - [Aniwrapper Menus](#aniwrapper-menus)
- [Search Anime](#search-anime) - [Search Anime](#search-anime)
- [Dealing with conflicting search queries / rofi grabbing from search list](#dealing-with-conflicting-search-queries--rofi-grabbing-from-search-list) - [Dealing with conflicting search queries / rofi grabbing from search list](#dealing-with-conflicting-search-queries--rofi-grabbing-from-search-list)
- [Anime Selection](#anime-selection) - [Anime Selection](#anime-selection)
- [Episode Selection](#episode-selection) - [Episode Selection](#episode-selection)
- [Usage](#usage) - [Usage](#usage)
- [aniwrapper](#aniwrapper-1) - [aniwrapper](#aniwrapper-1)
- [Option 1: Streaming](#option-1-streaming) - [Option 1: Streaming](#option-1-streaming)
- [Option 2: Download](#option-2-download) - [Option 2: Download](#option-2-download)
- [Option 3: Continue](#option-3-continue) - [Option 3: Continue](#option-3-continue)
- [Option 4: Play from File](#option-4-play-from-file) - [Option 4: Play from File](#option-4-play-from-file)
- [Option 5: Sync History](#option-5-sync-history) - [Option 5: Sync History](#option-5-sync-history)
- [ani-cli](#ani-cli) - [ani-cli](#ani-cli)
- [Screenshots](#screenshots) - [Screenshots](#screenshots)
<!-- markdown-toc end --> <!-- markdown-toc end -->
@ -75,13 +75,13 @@ script for MPV during setup if it is not already installed_
Upon activation, the skip-intro script will try its best to skip the Upon activation, the skip-intro script will try its best to skip the
episode introduction by skipping to the next moment of silence in the video episode introduction by skipping to the next moment of silence in the video
- If the video has not pre-loaded past the introduction, the script will not - If the video has not pre-loaded past the introduction, the script will not
know what to do. Press `TAB` again to stop the script until the video know what to do. Press `TAB` again to stop the script until the video
has loaded enough, or just manually skip past the intro. has loaded enough, or just manually skip past the intro.
- If the video does not have a pause in audio (or a significant enough drop in - If the video does not have a pause in audio (or a significant enough drop in
audio volume) between the end of the introduction and the beginning of the audio volume) between the end of the introduction and the beginning of the
video/episode, then the script may fail and skip to a random point in the video/episode, then the script may fail and skip to a random point in the
video video
## Installing ## Installing
@ -103,10 +103,10 @@ To install manually, make sure the dependencies are installed first
```sh ```sh
# Arch # Arch
pacman -S --needed grep curl sed mpv ffmpeg rofi sqlite3 pacman -S --needed curl grep mpv rofi sed sqlite3
# Debian # Debian
apt install grep curl sed mpv ffmpeg rofi sqlite3 apt install curl grep mpv rofi sed sqlite3
``` ```
#### Clone the repo #### Clone the repo
@ -119,7 +119,7 @@ git clone https://github.com/ksyasuda/aniwrapper && cd aniwrapper
#### Run the setup and install the script #### Run the setup and install the script
After switching into the `aniwrapper` directory, run the following commands to set up and install the script From the `aniwrapper` directory, run the following commands to set up and install the script
```sh ```sh
chmod +x setup.sh chmod +x setup.sh
@ -134,11 +134,11 @@ There are several menus used to drive the program forward
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 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
As of the update on ___2022-01-01___, if selecting an anime from the search history list, the [anime selection](#anime-selection) menu will be skipped and the program will move on to [episode selection](#episode-selection) As of the update on **_2022-01-01_**, if selecting an anime from the search history list, the [anime selection](#anime-selection) menu will be skipped and the program will move on to [episode selection](#episode-selection)
### Dealing with conflicting search queries / rofi grabbing from search list ### Dealing with conflicting search queries / rofi grabbing from search list
I can write more about it later, but in this program, rofi is configured to search with case insensitivity and select the best match from the list if there are matches. This can make it difficult at times to write a search query that does not trigger a selection from the rofi menu I can write more about it later, but in this program, rofi is configured to search with case insensitivity and select the best match from the list if there are matches. This can make it difficult at times to write a search query that does not trigger a selection from the rofi menu
<div align="center"> <div align="center">
@ -199,8 +199,8 @@ aniwrapper -cqd
### Option 1: Streaming ### Option 1: Streaming
- [click here](https://imgur.com/nLjqLCL.gif) for an example showing streaming a new anime - [click here](https://imgur.com/nLjqLCL.gif) for an example showing streaming a new anime
- [click here](https://imgur.com/undefined.png) for an example showing streaming a previously watched anime - [click here](https://imgur.com/undefined.png) for an example showing streaming a previously watched anime
Streaming is the default option for the `aniwrapper` script and will prompt you with each of the menus specified in the _[aniwrapper Menus](#aniwrapper-menus)_ section Streaming is the default option for the `aniwrapper` script and will prompt you with each of the menus specified in the _[aniwrapper Menus](#aniwrapper-menus)_ section
@ -216,7 +216,7 @@ The continue option queries the `sqlite3` history databse and pulls the list of
### Option 4: Play from File ### Option 4: Play from File
This option prompts you to provide the path to your `Videos` directory. Any path can be provided, but the script will begin the search from the provided path. From there, follow the prompts to select the video you want to watch and it will be opened in `mpv` This option prompts you to provide the path to your `Videos` directory. Any path can be provided, but the script will begin the search from the provided path. From there, follow the prompts to select the video you want to watch and it will be opened in `mpv`
### Option 5: Sync History ### Option 5: Sync History
@ -224,9 +224,9 @@ This option allows you to sync your search/watch history across devices. It quer
At the moment, the requirements are as follows: At the moment, the requirements are as follows:
- You must be able to `ssh` into the remote machine - You must be able to `ssh` into the remote machine
- The username must be the same across both devices - The username must be the same across both devices
- The `history.sqlite3` file must be in the default location: `$XDG_CONFIG_HOME/aniwrapper/history.sqlite3` - The `history.sqlite3` file must be in the default location: `$XDG_CONFIG_HOME/aniwrapper/history.sqlite3`
## ani-cli ## ani-cli
@ -253,9 +253,9 @@ ani-cli -c
![aniwrapper main menu](https://imgur.com/Nvd9oJV.png) ![aniwrapper main menu](https://imgur.com/Nvd9oJV.png)
- [query anime](https://imgur.com/vSyaoG6.png) - [query anime](https://imgur.com/vSyaoG6.png)
- [aniwrapper streaming options](https://imgur.com/7JxvZz8.png) - [aniwrapper streaming options](https://imgur.com/7JxvZz8.png)
- [aniwrapper file selection](https://imgur.com/vFTxAgu.png) - [aniwrapper file selection](https://imgur.com/vFTxAgu.png)
- [aniwrapper episode selection menu](https://imgur.com/vlOg8uc.png) - [aniwrapper episode selection menu](https://imgur.com/vlOg8uc.png)
</div> </div>