AniTUI is a CLI (and in the future a TUI) app for searching and wathching anime in MPV.

Overview

AniTUI is a CLI (and in the future a TUI) app for searching and wathching anime in MPV. This is a Rust rewrite (quite literally a rewrite) of Pystardust's ani-cli. Thanks to ani-cli for decoding the magic of goload.pro or whatever mirror they have in the future.

Usage

AniTUI uses an ID in a format of . To perform commands like watch or ep-count you need to first get an ID via search.

$ ani-tui search "keywords"

The output will contain a list of titles and IDs in <>. Copy the ID and use it in other commands.

" $ ani-tui list-eps """>
$ ani-tui detail ""

$ ani-tui list-eps ""

detail will give you the most info about an anime like its description, ID, episode count and of course the title. list-eps only yields the title and number of episodes.

" 1">
$ ani-tui watch "" 1

Watch an episode. Replace ID and 1 (episode number) with your values.

You can use either help command, -h or --help to get a help message explaining how to use AniTUI.


Contributing

  1. View open issues/projects or create your own issue
  2. Fork
  3. Write some code
  4. Refactor
  5. Write docs
  6. Make a pull request explaining the changes

Branch guide

main

A "checkpoint" of sorts. Contains the latest stable commit. Never commit to main, instead commit to `dev` and merge (PR not required).

dev

Contains the work in progress commits. Unlike main this can have failing tests and missing docs.

Comments
  • Fix goload.pro series identifiers

    Fix goload.pro series identifiers

    Expected behavior

    An ID obtained from the search should be usable to get to other episodes in the series

    Actual behavior

    Some series have inconsistent links like:

    goload.pro/videos/pokemon-xyz-episode-1
                      ~~~~~~~~~~~
    goload.pro/videos/pokemon-xy-z-episode-30
                              ^^^^
    

    So you cannot reach all episodes with the current ID format since it only incudes the ~~~ underlined part.

    Solution

    Make the ID store the episode link fully, and use the episode list on the page to navigate around. Proposed format:

    <source:id#ep> Where:

    • Source: a website name abbreviation followed by a version. E.g: <GLP-1:...>, -1 is a version number to make sure the new format can be distingueshed from the old format and an error is then detectable.
    • ID: The same as the ~~~ underlined part in the links above. <...:pokemon-xy-z#...>
    • Ep: Episode number at the end of the link. E.g: <...#12>

    Example ID: <GLP-1:pokemon-xy-z#30>.

    For commands that need an episode in the series like watch <id> <ep> the episode should still be supplied since changing the episode in the identifier could yield an invalid link.

    Such link encoding cautions should also be applied to any other sources.

    Version

    0.1.1

    bug enhancement 
    opened by m-kuzmin 2
  • TDD by Reso coder (Actually Uncle Bob)?

    TDD by Reso coder (Actually Uncle Bob)?

    Problem

    The code is hard to organize and its not very easy to maintain.

    Solution

    This app reminds me of TDD tutorial by Reso Coder, Episode 1 of that. Since a lot of the code is already in git I can try to start from scratch and do it this way. It will also enable extensions down the line.

    Could Close #2.

    Pros

    Better flexibility in terms of user facing UI and ability to rewrite large chunks of impl. details without affecting the rest of the code (due to code structure).

    Disadvantages

    It may be an overkill and there could be some issue later that I don't know of.

    code-style 
    opened by m-kuzmin 2
  • std::Command in streaming link getter implementation?

    std::Command in streaming link getter implementation?

    Problem

    AniTUI needs to go through some pretty weird hoops to get the streaming link. This could be implemented in rust by translating shell script to rust code, but there are two problems: (1) code could have to be updated, (2) this can be time consuming to rewrite and write for the first time.

    Solution idea

    So to make updating this critical part of the code faster I propose to just write it using a rather safe std::Command API.

    Example

    // pseudo rust
    let v = some_rust_code();
    more_rust_code(Command::execute().arg(v).get_stdout());
    

    Pros

    1. It's fast to update
    2. It's still possible to rewrite anytime in pure rust with no Command invocations. And both solutions are very compatible.

    Disadvantages

    Its not as rusty as it could be. And maybe its slower. However from my experience the most amount of time is spent while MPV is downloading content anyway.

    And (no benches so no proof) but this shouldn't be that time consuming to execute.

    code-style 
    opened by m-kuzmin 1
  • Rewrite webpage parser

    Rewrite webpage parser

    Problem

    Parser struct became a Swiss knife of parsing webpages. And the returned data structures contain a lot of unnecessary fields

    Solution

    Each page would be loaded by the browser and put into its own page object that implements cached getters.

    Example

    //! pseudo code != current API
    
    struct EpisodePage {
        html: String,
        title: Option<String>,
    }
    
    let anime = EpisodePage(browser.get("something")); // fast to create, doesnt process
    let title = anime.title(); // parses on demand
    

    Pros

    It's essentially the same style as Parser, but takes the load off the parser since it already has so many pattern fields.

    Disadvantages

    This may impact the performance though. If each page compiles its own patterns it will not be as efficient as it could be.

    • [ ] Add pattern cache
    • [ ] (Optionally) What if there is need to parse different websites?
    code-style 
    opened by m-kuzmin 1
  • Description not being captured by `easy_scraper` crate.

    Description not being captured by `easy_scraper` crate.

    Describe the bug

    For an anime like Kemono Jihen the description is plain text. In case of something like Pokemon XY the description has complex HTML in it.

    Kemono Jihen

    Kohachi Inugami, a detective who specializes in the occult, arrives at a remote village in the Japanese countryside ...
    

    Pokemon XY

    <p>
    <span>The XY series is based on the events of the Generation VI games. As with the previous three series, the XY series begins with only&nbsp;
    </span>
    Satoshi
    ...
    

    To Reproduce

    1. ani-tui detail "pokemon-xy" You will only see "Satoshi" and not the full description as on the website.

    Expected behavior

    The full description from the website. Formatting can be dropped.

    Version info

    • ani-tui v0.1.1

    This might be a wontfix

    Reason: easy_scraper doesnt seem to have a good way to solve this and tbh goload.pro is the buggiest and most inconsistent website ever. So fixing might just not make sense. Help wanted: if someone has a fix that would be great.

    bug help wanted good first issue 
    opened by m-kuzmin 0
A little application that makes it possible to display mpv's subs anywhere you want.

Mpv Subs Popout A little application that makes it possible to display mpv's subs anywhere you want. Why? You can now watch shows in foreign languages

sdaqo 4 Jul 14, 2023
A template for bootstrapping a Rust TUI application with tui-rs & crossterm

rust-tui-template A template for bootstrapping a Rust TUI application with tui-rs & crossterm. tui-rs The library is based on the principle of immedia

Orhun Parmaksız 72 Dec 31, 2022
A ln scraper to read light novels and watch anime in your terminal (Written in rust)

Readme Table of content Why use kami Dependencies Install Linux/mac Windows Honorable mentions Why use kami Well its a fast and easy way to watch anim

mrfluffy 26 Dec 23, 2022
Crates.io library that provides high-level APIs for obtaining information on various entertainment media such as books, movies, comic books, anime, manga, and so on.

Crates.io library that provides high-level APIs for obtaining information on various entertainment media such as books, movies, comic books, anime, manga, and so on.

consumet-rs 5 Aug 13, 2023
A MyAnimeList-based anime recommendation system

anote anote is a MyAnimeList-based anime recommendation system written in Rust. It uses genre combinations to determine what recommendations to give w

null 15 May 8, 2024
TimeKnight is a neat little TUI-based timer app I use in conjunction with a task tracker

TimeKnight is a neat little TUI-based timer app I use in conjunction with a task tracker. It's kind of a secret sauce for productivity (particularly if you have ADHD or have a ridiculously overactive brain).

Monomadic 1 Feb 8, 2022
Command line application for searching

maven_search_rs Command line application for searching in https://search.maven.org Usage Non-interactive $ maven-search -f maven wicket-core The abov

Martin Grigorov 1 Nov 5, 2021
A file server that supports static serving, uploading, searching, accessing control, webdav...

Dufs Dufs is a distinctive utility file server that supports static serving, uploading, searching, accessing control, webdav... Features Serve static

null 3.6k Oct 30, 2023
Argument parsing for the future 🚀

argi Argument parsing for the future ?? Features Macro-based approach, providing an intuitive way to layout a cli Rich auto-help generation, styling b

Owez 132 Oct 23, 2022
A build system from the future 🖖

warp is an friendly, fast, correct, and extensible build system built for polyglot monorepos that uses JavaScript for its configuration and is built i

warp.build 7 Apr 4, 2023
A todo list app that indexes your app to find TODO:'s

forgot A todo list app that indexes your app to find TODO:'s Usage to list all your todos forgot list list all your todos ignoring search in ./target,

null 2 Oct 6, 2022
A cli prepared with TUI that facilitates your operations.

⚠️ For linux only ⚠️ Helper CLI A cli prepared with TUI that facilitates your operations. Click me to learn more about the theme system. If you just w

Yiğit 4 Feb 1, 2022
A TUI for your todos built in Rust with full CLI support.

todui TUI Features This app allows for almost anythig you would need when dealing with todos: Create, edit, and delete tasks Add links to tasks Add du

Daniel Melchor 14 Apr 1, 2023
CLI calculator app and library

calc Yet another CLI calculator. Inspired by the excellent https://github.com/alfredxing/calc. Installation With a Rust toolchain in place: cargo inst

Peter Goodspeed-Niklaus 34 Nov 13, 2022
Small and simple CLI app to generate .editorconfig based on a given settings.

add-editorconfig Small and simple CLI app to generate .editorconfig based on a given settings. Usage # Will create an .editorconfig in the current dir

Reinaldy Rafli 3 Jan 16, 2022
zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets you're watching easily into watchlists for easy access on your terminal.

zigfi zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets

Aldrin Zigmund Cortez Velasco 18 Oct 24, 2022
Simple but convenient CLI-based Matrix client app for sending and receiving (in Rust)

matrix-commander-rs simple but convenient CLI-based Matrix client app for sending and receiving Help create this Rust program! This project is current

null 19 Dec 30, 2022
simple but convenient CLI-based Nostr client app for following users and sending DMs

nostr-commander-rs TLDR: simple but convenient CLI-based Nostr client app for publishing, sending DMs, as well as following users and channels nostr-c

null 18 Dec 30, 2022
A CLI app to set and organize your favorite DNS servers.

rdns A CLI app to set and organize your favorite DNS servers. Introduction rdns is a CLI utility that can set your system DNS, either directly or by m

null 4 Feb 19, 2024