Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4674574
resourced to allanime
CoolnsX Dec 24, 2022
1d6f425
feat: nth and external launcher
justchokingaround Dec 24, 2022
d7b132c
feat: loop control logic
Derisis13 Dec 26, 2022
8feebb2
feat: `launcher` and `nth` prompt-message
Derisis13 Dec 26, 2022
0b3fb94
chore: GPL3 preabmle
Derisis13 Dec 26, 2022
24b2b06
feat: gogoanime resolution parsing
CoolnsX Dec 27, 2022
61bdbb8
chore: made all sed uniform with `|` separator
Derisis13 Dec 27, 2022
180206e
fix: next/previous work for non-integer episodes
Derisis13 Dec 27, 2022
aba867d
feat: quality selection works
Derisis13 Dec 27, 2022
bc60f4a
feat: leaner quality selection by @71zenith
Derisis13 Dec 30, 2022
00dc525
feat: mpv and untested vlc/syncplay/download
Derisis13 Dec 27, 2022
fa84d9d
chore: removed shellcheck exceptions
Derisis13 Dec 27, 2022
7b95f6f
feat: downloads, fix : .5 episode streaming
CoolnsX Dec 28, 2022
709b6dc
feat: window titles
Derisis13 Dec 28, 2022
c846278
fix: select quality returns multiple urls
Derisis13 Dec 28, 2022
187a8b6
docs: updated PR template (might change further)
Derisis13 Dec 28, 2022
6bc8935
feat: script parameters can be set with env-vars
Derisis13 Dec 30, 2022
9e69070
feat: argument parsing
Derisis13 Dec 31, 2022
7a06a9c
feat: `--version` and `--help` now work
Derisis13 Jan 1, 2023
f90d6ee
fix: all links are now printed in debug mode
Derisis13 Jan 1, 2023
78a3e20
feat: added dependency checker
justchokingaround Jan 2, 2023
ef33ccd
feat: episode arg
justchokingaround Jan 2, 2023
359e7e9
feat: self-update
justchokingaround Jan 2, 2023
82d2182
:shrug: <- don't do commits like this pls
Nannk Jan 3, 2023
4670479
feat: better player support
CoolnsX Jan 10, 2023
fe08bfa
feat: vlc player support for all OS
CoolnsX Jan 10, 2023
ac95410
fix: -A -> -U in wget
CoolnsX Jan 10, 2023
d7988ff
feat: use external menu for query
justchokingaround Jan 10, 2023
df690dc
docs: add back zenith as maintainer
port19x Jan 13, 2023
471d33c
feat: history
Derisis13 Jan 13, 2023
8bb2034
fix: die when optarg is missing from `-q` or `-e`
Derisis13 Jan 13, 2023
a459f1e
feat: option for dub mode
Derisis13 Jan 13, 2023
262e9e9
feat: range selection
justchokingaround Jan 17, 2023
ad9dac6
steamdeck readme stuff (#976)
Nannk Jan 21, 2023
2307b20
feat: if terminal then external menu 0, else 1
justchokingaround Jan 22, 2023
f9ee701
feat: add line number to menu
71zenith Jan 22, 2023
4faa1c8
docs: readme update
port19x Jan 22, 2023
2ddcad8
docs: manpage
Derisis13 Jan 23, 2023
b26e007
docs: expand on PR template
port19x Jan 23, 2023
a669ec4
chore: v4.0 -> v4.0.0
port19x Jan 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .assets/ani-cli-spec.png
Binary file not shown.
5 changes: 3 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
* @port19x
/.assets/ @iamchokerman
README.md @iamchokerman
/.assets/ @justchokingaround
README.md @justchokingaround
hist_transition.sh @Derisis13
ani-cli.1 @Derisis13
24 changes: 15 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,25 @@

- [ ] any anime playing
- [ ] bumped version
---
- [ ] next, prev and replay work
- [ ] quality works
- [ ] downloads work
- [ ] quality works with downloads
- [ ] select episode -a and rapid resume work
- [ ] syncplay -s works
- [ ] autoplay, aka range selection, works
- [ ] `-c` history and continue work
- [ ] `-d` downloads work
- [ ] `-s` syncplay works
- [ ] `-q` quality works
- [ ] `-v` vlc works
- [ ] `-e` select episode works
- [ ] `-r` range selection works
- [ ] `--dub` both work
- [ ] all providers return links (not necessarily on a single anime, use debug mode to confirm)
---
- [ ] `-h` help info is up to date
- [ ] Readme is up to date
- [ ] Man page is up to date

## Additional Testcases

- The safe bet: One Piece
- Episode 0: Saenai Heroine no Sodatekata ♭
- Unicode: Saenai Heroine no Sodatekata ♭
- Not uploaded: one piece dub episode 590
- Unreleased: soredemo ayumu wa yosetekuru
- Short id (for decryption): Log Horizon episode 1-2
- Non-whole episodes: Tensei shitara slime datta ken (ep. 24.5, ep. 24.9)
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
env:
SHELLCHECK_OPTS: -s sh -o all -e 2250 -e 2016 -x
SHELLCHECK_OPTS: -s sh -o all -e 2250
4 changes: 0 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@
- Take part in troubleshooting and testing
- Star the repo
- Follow the maintainers

## Architecture

![spec](https://github.com/pystardust/ani-cli/blob/spec/.assets/ani-cli-spec.png)
171 changes: 130 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
<h1 align="center">
<a href="https://matrix.to/#/#ani-cli:matrix.org"><img src="https://element.io/blog/content/images/2020/07/Logomark---white-on-green.png" width="80"></a>
<a href="https://discord.gg/aqu7GpqVmR"><img src="https://pnggrid.com/wp-content/uploads/2021/05/Discord-Logo-Square-1024x1024.png" width="80"></a>
<a href="https://nightly.revolt.chat/invite/4FKHbs78"><img src="https://developers.revolt.chat/img/logo.png" width="80"></a>
<br>
<a href="https://github.com/port19x"><img src="https://img.shields.io/badge/lead-port19x-lightblue"></a>
<a href="https://github.com/CoolnsX"><img src="https://img.shields.io/badge/maintainer-CoolnsX-blue"></a>
<a href="https://github.com/justchokingaround"><img src="https://img.shields.io/badge/maintainer-justchokingaround-blue"></a>
<a href="https://github.com/Derisis13"><img src="https://img.shields.io/badge/maintainer-Derisis13-blue"></a>
<a href="https://github.com/71zenith"><img src="https://img.shields.io/badge/maintainer-71zenith-blue"></a>

</p>

<h3 align="center">
A cli to browse and watch anime (alone AND with friends). This tool scrapes the site <a href="https://animixplay.to/">animixplay.</a>
A cli to browse and watch anime (alone AND with friends). This tool scrapes the site <a href="https://allanime.site/">allanime.</a>
</h3>

<h1 align="center">
Expand All @@ -31,7 +31,6 @@ https://user-images.githubusercontent.com/44473782/160729779-41fe207c-b5aa-4fed-
## Table of Contents

- [Fixing errors](#Fixing-errors)
- [New in v3](#New-in-v3)
- [Install](#Install)
- [Linux](#Linux)
- [Debian](#Debian)
Expand All @@ -42,6 +41,7 @@ https://user-images.githubusercontent.com/44473782/160729779-41fe207c-b5aa-4fed-
- [MacOS](#MacOS)
- [Windows](#Windows)
- [Android](#Android)
- [Steam Deck](#Steam-deck)
- [Uninstall](#Uninstall)
- [Dependencies](#Dependencies)
- [Homies](#Homies)
Expand All @@ -54,22 +54,24 @@ If you encounter "Video url not found" or any breaking issue, then make sure you
`sudo ani-cli -U` to update on Linux, Mac and Android. On Windows, run gitbash as administrator then there type `ani-cli -U`.
If after this the issue persists then open an issue.

History has been reworked and relocated. We're working on a transition script, please be patient. Old history can be viewed with `less ${XDG_CACHE_HOME:-$HOME/.cache}/ani-hsts`

## Install

#### Users of V3.2 or the v3.2.x series should uninstall before upgrading
Otherwise you're likely to see an error like the following: ` "/usr/bin/ani-cli: line 470: (...)/player_mpv: No such file or directory"`

### Native packages

[![Packaging status](https://repology.org/badge/vertical-allrepos/ani-cli.svg?minversion=3.0)](https://repology.org/project/ani-cli/versions)
[![Packaging status](https://repology.org/badge/vertical-allrepos/ani-cli.svg?minversion=4.0)](https://repology.org/project/ani-cli/versions)

*Native packages have a more robust update cycle, but sometimes they are slow to upgrade. If the one for your platform is up-to-date we suggest going with it.*

### Linux

#### Debian

```
```sh
wget -qO- https://Wiener234.github.io/ani-cli-ppa/KEY.gpg | sudo tee /etc/apt/trusted.gpg.d/ani-cli.asc
wget -qO- https://Wiener234.github.io/ani-cli-ppa/ani-cli-debian.list | sudo tee /etc/apt/sources.list.d/ani-cli-debian.list
sudo apt update
Expand All @@ -94,7 +96,7 @@ Build and install from the AUR:
```sh
yay -S ani-cli
```
Also consider ani-cli-git
Also consider `ani-cli-git`

#### OpenSuse Tumbleweed and Leap

Expand All @@ -109,20 +111,18 @@ zypper install ani-cli
```
You'll get a warning about `Signature verification failed [4-Signatures public key is not available]` but this can be ignored from the prompt.

*Note: package is noarch, so any architecture should work, even though the repo is labled x86-64*
*Note: package is noarch, so any architecture should work, even though the repo is labelled x86-64*

#### Installing from source

Install dependencies [(See below)](#Dependencies)

```sh
sudo rm -rf "/usr/local/share/ani-cli" "/usr/local/bin/ani-cli" "/usr/local/bin/UI" /usr/local/bin/player_* #If some of these aren't found, it's not a problem
git clone "https://github.com/pystardust/ani-cli.git" && cd ./ani-cli
sudo cp ./ani-cli /usr/local/bin
cd .. && rm -rf "./ani-cli"
git clone "https://github.com/pystardust/ani-cli.git"
sudo cp ani-cli/ani-cli /usr/local/bin
rm -rf ani-cli
```
*Also note that mpv installed through flatpak is not compatible*


### MacOS

Expand All @@ -140,21 +140,20 @@ cd .. && rm -rf ./ani-cli
*To install (with Homebrew) the dependencies required on Mac OS, you can run:*

```sh
brew install curl grep axel openssl@1.1 ffmpeg git && \
brew install wget grep aria2 ffmpeg git fzf && \
brew install --cask iina
```
*Why iina and not mpv? Drop-in replacement for mpv for MacOS. Integrates well with OSX UI. Excellent support for M1. Open Source.*

### Windows

*Make sure git bash is installed [(Install)](https://git-scm.com/download/win)*
*ani-cli needs a posix shell and the current way is git bash. Unfortunately fzf can't run in git bash's default terminal. The solution is to use git bash in windows terminal*

*Note that the installation instruction below must be done inside **Git Bash**, not in Command Prompt or Powershell*
First, you'll need windows terminal preview. [(Install)](https://apps.microsoft.com/store/detail/windows-terminal-preview/9N8G5RFZ9XK3?hl=de-at&gl=at&rtc=1)

mpv is not added to $PATH automatically when installed and thus the script is unable to use it. You either have to do this manually, or install it via scoop (recommended):
```sh
scoop install mpv
```
Then make sure git bash is installed. [(Install)](https://git-scm.com/download/win) It needs to be added to windows terminal [(Instructions)](https://stackoverflow.com/questions/56839307/adding-git-bash-to-the-new-windows-terminal)

The following steps and ani-cli need to be run from git bash in windows terminal.

#### Scoop bucket

Expand All @@ -166,12 +165,14 @@ scoop install ani-cli
#### From source
```sh
rm -rf "/usr/local/share/ani-cli" "/usr/local/bin/ani-cli" "/usr/local/bin/UI" /usr/local/bin/player_* #If some of these aren't found, it's not a problem
git clone "https://github.com/pystardust/ani-cli.git" && cd ./ani-cli
cp ./ani-cli /usr/bin
cd .. && rm -rf ./ani-cli
git clone "https://github.com/pystardust/ani-cli.git"
cp ani-cli/ani-cli /usr/bin
rm -rf /ani-cli
```

*Run ani-cli in Git Bash (Running it in cmd or powershell may or may not work)*
#### Dependencies

All dependencies can be installed with scoop (from the extras bucket), however some users experienced that installed programs aren't always added to the path. If this happens installing from winget instead usually works.

### Android

Expand All @@ -189,29 +190,106 @@ pkg install ani-cli
```sh
pkg up -y
rm -rf "$PREFIX/share/ani-cli" "$PREFIX/bin/ani-cli" "$PREFIX/bin/UI" "$PREFIX"/local/bin/player_* #If some of these aren't found, it's not a problem
git clone "https://github.com/pystardust/ani-cli.git" && cd ./ani-cli
cp ./ani-cli "$PREFIX"/bin
cd .. && rm -rf ./ani-cli
git clone "https://github.com/pystardust/ani-cli.git"
cp ani-cli/ani-cli "$PREFIX"/bin
rm -rf /ani-cli
```

For players you can use the apk (playstore/fdroid) versions of mpv and vlc. Note that these cannot be checked from termux so a warning is generated when checking dependencies.

### Steam Deck
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this section is a bit lengthy, I'm open to ideas what to do with installation instructions (wiki tab?)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Having all this in the main readme is a bit much.
<details> could also be a solution, so it's hidden by default but can be folded out.


#### Copypaste script:

* Switch to Desktop mode (`STEAM` Button > Power > Switch to Desktop)
* Open `Konsole` (Steam Deck Icon in bottom left corner > System > Konsole)
* Copy the script, paste it in the CLI and press Enter("A" button on Steam Deck)

```sh
[ ! -d ~/.local/bin ] && mkdir ~/.local/bin && echo "export $PATH=$HOME/.local/bin:$PATH" >> ".$(echo $SHELL | sed -nE "s|.*/(.*)\$|\1|p")rc"

git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install

mkdir ~/.aria2c
wget -O ~/.aria2c/aria2-1.36.0.tar.bz2 https://github.com/q3aql/aria2-static-builds/releases/download/v1.36.0/aria2-1.36.0-linux-gnu-64bit-build1.tar.bz2
tar xvf ~/.aria2c/aria2-1.36.0.tar.bz2 -C ~/.aria2c/
cp ~/.aria2c/aria2-1.36.0-linux-gnu-64bit-build1/aria2c ~/.local/bin/
chmod +x ~/.local/bin/aria2c

git clone https://github.com/pystardust/ani-cli.git ~/.ani-cli
cp ~/.ani-cli/ani-cli ~/.local/bin/

flatpak install io.mpv.Mpv
```
press enter("A" button on Steam Deck) on questions

#### Installation in steps:

##### Install mpv (Flatpak version):

```sh
flatpak install io.mpv.Mpv
```
press enter("A" button on Steam Deck) on questions

##### Install [fzf](https://github.com/junegunn/fzf):

```sh
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
```
press enter("A" button on Steam Deck) on questions

##### Make a ~/.local/bin folder if doesn't exist and add it to $PATH

```sh
[ ! -d ~/.local/bin ] && mkdir ~/.local/bin && echo "export $PATH=$HOME/.local/bin:$PATH" >> ".$(echo $SHELL | sed -nE "s|.*/(.*)\$|\1|p")rc"
```

Note : Vlc Android now works too ;)
##### Install [aria2](https://github.com/aria2/aria2) (needed for download feature only):

```sh
mkdir ~/.aria2c
wget -O ~/.aria2c/aria2-1.36.0.tar.bz2 https://github.com/q3aql/aria2-static-builds/releases/download/v1.36.0/aria2-1.36.0-linux-gnu-64bit-build1.tar.bz2
tar xvf ~/.aria2c/aria2-1.36.0.tar.bz2 -C ~/.aria2c/
cp ~/.aria2c/aria2-1.36.0-linux-gnu-64bit-build1/aria2c ~/.local/bin/
chmod +x ~/.local/bin/aria2c
```

##### Install ani-cli:

```sh
git clone https://github.com/pystardust/ani-cli.git ~/.ani-cli
cp ~/.ani-cli/ani-cli ~/.local/bin/
```

You need to add any referrer in mpv by opening mpv [(playstore version)](https://play.google.com/store/apps/details?id=is.xyz.mpv), going into Settings -> Advanced -> Edit mpv.conf and adding (for example):
##### Optional: add desktop entry:

```
referrer="https://animixplay.to/"
echo '[Desktop Entry]
Encoding=UTF-8
Version=4.0
Type=Application
Exec=konsole -e ani-cli
Name=ani-cli' > ~/.local/share/applications/ani-cli.desktop
```
The .desktop entry will allow to start ani-cli in Konsole directly from "Gaming Mode"
In Steam Desktop app:
`Add game` > `Add a non-steam game` > tick a box for `ani-cli` > `Add selected programs`
*Note: Konsole window size bugs out if launched from "Gaming Mode".*
*Note: this is not working the way it should yet.*

## Uninstall

* apt:
```
```sh
sudo apt remove ani-cli
# to remove the repository from apt:
# to remove the repository from apt
sudo rm -f /etc/apt/trusted.gpg.d/ani-cli.asc /etc/apt/sources.list.d/ani-cli-debian.list
```
* dnf:
```
```sh
sudo dnf remove ani-cli # for ani-cli
# disable the repo in dnf
dnf copr disable derisis13/ani-cli
Expand All @@ -224,7 +302,7 @@ zypper removerepo ani-cli
```
You might want to remove `packman-essentials` if you don't need it otherwise
* AUR:
```
```sh
yay -R ani-cli
```
* Scoop:
Expand All @@ -245,30 +323,41 @@ In **Git Bash** run (as administrator):
rm "/usr/bin/ani-cli"
```
* Termux package
```
```sh
pkg remove ani-cli
```
* Android:
```sh
rm "$PREFIX/bin/ani-cli"
```
* Steam Deck
```sh
rm "~/.local/bin/ani-cli"
rm -rf ~/.ani-cli
```
optionally: remove dependencies:
```sh
rm ~/.local/bin/aria2c
rm -rf "~/.aria2"
rm -rf "~/.fzf"
flatpak uninstall io.mpv.Mpv
```

## Dependencies

- grep
- sed
- awk
- curl
- openssl
- wget
- mpv - Video Player
- iina - mpv replacement for MacOS
- axel - Download manager
- aria2c - Download manager
Comment thread
port19x marked this conversation as resolved.
- ffmpeg - m3u8 Downloader
- fzf (optional)
- fzf - User interface

## Homies
## Homies

* [animdl](https://github.com/justfoolingaround/animdl): Ridiculously efficient, fast and light-weight (supports most sources: animixplay, 9anime...) (Python)
* [animdl](https://github.com/justfoolingaround/animdl): Ridiculously efficient, fast and light-weight (supports most sources: allanime, zoro ... (Python)
* [jerry](https://github.com/justchokingaround/jerry): stream anime with anilist tracking and syncing, with discord presence (Shell)
* [anime-helper-shell](https://github.com/Atreyagaurav/anime-helper-shell): A python shell for searching, watching, and downloading anime (Python)
* [anipy-cli](https://github.com/sdaqo/anipy-cli): ani-cli rewritten in python (Python)
* [dra-cla](https://github.com/CoolnsX/dra-cla): ani-cli equivalent for korean dramas (Shell)
Expand Down
Loading