Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.
/ aniwrapper Public archive
forked from Dink4n/ani-cli

A rofi wrapper around my fork of ani-cli: a command-line tool to stream, download, and play anime

License

Notifications You must be signed in to change notification settings

ksyasuda/aniwrapper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aniwrapper

Setup | Usage | Screenshots

showcase.mp4

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, which uses rofi to gather information and control the program flow. In addition to rofi, I've also changed the way saving history works by integrating a local sqlite3 database with a table for search, watch, and file history

While this is a fork of a fork of pystardust's old-ani-cli, I would call this more of a light fork of the the main ani-cli. I have implemented most of the main features from the original script and continue to use the same scraping logic

This tool scrapes the site gogoanime.

Table of Contents

MPV Extension - Skip Intro Script

This repo comes packaged with and will install the skip-intro.lua script for MPV during setup if it is not already installed

The script is activated with the TAB key

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

  • 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 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 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

Installing

These are the minimum dependences required to run aniwrapper

axel curl ffmpeg grep mpv rofi sed sqlite3

Arch Linux

aniwrapper-git is available on the AUR for Arch users

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

Manual Install

Install the Dependencies

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

# Debian
apt install axel curl ffmpeg grep mpv rofi sed sqlite3

Clone and switch into the repo directory

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

Then, from 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

See aniwrapper menus

Dealing with conflicting search queries / rofi grabbing from search list

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

selection with query 'isekai' Once your history starts filling up, it becomes progressively more difficult to form unique search queries

selection with dash A workaround for this is to append a dash - to the end of the search query
The above output was produced by searching: isekai -

Usage

aniwrapper

aniwrapper [-cdhpqSv] [-t <theme> or -T <config_path>] <query>
aniwrapper [-cpqSv] [-t <theme> or -T <config_path>] -f <path_to_directory>
aniwrapper -Q <query>
aniwrapper -C

aniwrapper <query> # Run in stream mode, searching for <query>
aniwrapper -c # Use ani-cli command-line mode (rofi disabled)
aniwrapper -C # Connect to history database
aniwrapper -d # Download anime in command-line mode
aniwrapper -d <query> # Run in download mode (best quality), searching for <query>
aniwrapper -e <episode> or <begin_episode - end_episode>
aniwrapper -f <starting_directory> # Specify starting directory for play_from_file mode, bypassing main menu
aniwrapper -h # Show help menu
aniwrapper -p # Enable player selection menu
aniwrapper -q # Launch menu with quality selection
aniwrapper -Q <query> # Query the history database
aniwrapper -r # Launch aniwrapper in quick-resume mode (start script on episode selection for the most recently streamed anime)
aniwrapper -S # Enable silent mode (suppress output to stdout) [cannot be used with -v]
aniwrapper -t <theme> # Choose rofi theme from presets
aniwrapper -T <path_to_config> # Specify custom rofi config
aniwrapper -v # Enable verbose logging

See aniwrapper menus for more information about the menus used in the following options

Option 1: Streaming

Streaming is the default option for the aniwrapper script

Example

example

Option 2: Download

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

Example

example

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

Example

example

Option 4: Recently Updated Anime

This option will present the name and episode number of 30 recently updated anime on gogoanime

Example

example

Option 5: Play from File

Example

example

Option 6: 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

Option 7: Choose Theme

Change aniwrapper theme

Example

example

Themes

Default theme

aniwrapper main menu

alter alter
aniwrapper aniwrapper
doom-one doomone
dracula dracula
fancyfancy
materialmaterial
monokaimonokai
nordnord
nord2nord2
onedarkonedark

About

A rofi wrapper around my fork of ani-cli: a command-line tool to stream, download, and play anime

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 92.8%
  • Lua 6.0%
  • Makefile 1.2%