A rofi wrapper around ani-cli: a command-line tool to browser, download, and stream anime
Go to file
ksyasuda a8a87744e8 update rofi config to steal window focus
could not input data on floating window managers
2021-11-29 22:51:44 -08:00
assets update readme and turn off verbose mode 2021-11-09 00:54:55 -08:00
lua change name of scripts directory to lua 2021-11-09 22:26:43 -08:00
sql change search/watch date from date to datetime 2021-11-01 12:53:10 -07:00
themes update rofi config to steal window focus 2021-11-29 22:51:44 -08:00
.gitignore update readme and add screenshots 2021-11-08 00:37:08 -08:00
ani-cli update gogoanime link to fix query 2021-11-29 13:08:41 -08:00
aniwrapper update aniwrapper sync to pass verbose option 2021-11-22 12:42:07 -08:00
db.sh fix continue and add delete from playlist 2021-11-12 17:22:22 -08:00
LICENSE Create LICENSE 2021-06-09 17:56:54 +05:30
Makefile update install path 2021-11-18 15:53:33 -08:00
README.md update readme 2021-11-26 17:56:06 -08:00
setup.sh update setup script to be queit by default 2021-11-26 17:54:52 -08:00

Aniwrapper

Setup | Usage | Screenshots

Aniwrapper screenshot

Table of Contents


Introduction

This is a fork of Dink4n's ani-cli, which itself is a fork of pystardust's old-ani-cli

This fork is a wrapper around a modified version of ani-cli and uses rofi to gather information and control the program

In addition to rofi, I've also changed the way saving history works by integrating a local sqlite3 database with a table for search and watch history

It is built around Dink4n's fork of ani-cli since at the time of creation, this is the version that has downloading working correctly

This tool scrapes the site gogoanime.

It is intended to be called from the wrapper script aniwrapper, however using the ani-cli script itself is also possible

Setup

Dependencies

These are the minimum dependences required to run aniwrapper

  • grep
  • curl
  • sed
  • mpv
    • skip-intro.lua (installed in setup.sh)
  • ffmpeg
  • rofi
    • meh.rasi (installed in setup.sh)
  • sqlite3

Installing

Arch Linux

aniwrapper-git is available on the AUR for Arch users

paru -S aniwrapper-git
or
yay -S aniwrapper-git

Manual Install

To install manually, make sure the dependencies are installed first

Install the Dependencies

# Arch
pacman -S --needed grep curl sed mpv ffmpeg rofi sqlite3

# Debian
apt-get install grep curl sed mpv ffmpeg rofi sqlite3

Clone the repo

Use the following command to clone the Git repository locally and switch into the cloned directory

git clone https://github.com/ksyasuda/aniwrapper && cd aniwrapper

Run setup script

After switching into the aniwrapper directory, run the following commands to set up and install the script

chmod +x setup.sh
./setup.sh && sudo make install

Aniwrapper Menus

There are several menus used to drive the program forward

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

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

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

Usage

aniwrapper

# Launch aniwrapper menu
aniwrapper

Option 1: Streaming

streaming gif select from menu Streaming a previously watched anime click here for an example showing streaming a new anime

Streaming is the default option for the aniwrapper script and will prompt you with each of the menus specified in the aniwrapper Menus section

Option 2: Download

The default download location is $HOME/Videos/sauce and will be chosen as the download directory unless otherwise specified

After specifying the download directory (or leaving it blank for the default), you will be presented with the menus from the aniwrapper Menus section for selecting the anime and episode(s) to download

Option 3: Continue

The continue option queries the sqlite3 history databse and pulls the list of distinct anime names from the watch_history table. Select an option from the list and the most recently watched episode of the selected anime will play

Option 4: Playlist

description coming soon

Option 5: Sync History

This option allows you to sync your search/watch history across devices. It queries the database on the remote machine and inserts/updates the necessary rows

At the moment, the requirements are as follows:

  • You must be able to ssh into the remote machine
  • 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

ani-cli Script

# watch anime
ani-cli <query>

# download anime
ani-cli -d <download_directory>

# resume watching anime
ani-cli -H

# list searched anime
ani-cli -l

# playlist mode
ani-cli -P

# add to playlist
ani-cli -a

# sync history across devices
ani-cli -s

Multiple episodes can be viewed/downloaded by giving the episode range like so

Choose episode [1-13]: 1 6

This would open/download episodes 1 2 3 4 5 6

Screenshots

Aniwrapper Main Menu aniwrapper frontpage Aniwrapper Streaming Menu aniwrapper streaming options More to come soon... maybe