diff --git a/README.md b/README.md index ab7c065..d66884d 100644 --- a/README.md +++ b/README.md @@ -15,29 +15,15 @@ Welcome to Fast Anime, your new favorite destination for streaming and downloadi - [Supporting the Project](#supporting-the-project) - [demo video](#demo-video) - ## Installation ### Using pip -Fast Anime can be installed using pip with the following command: - -```bash -pip install https://github.com/Benex254/FastAnime/releases/download/v0.20.0/fastanime-0.2.0.tar.gz -#then you can launch the app using the following command: -python -m fastanime -``` - -> [!TIP] -> To add a desktop entry, execute the following command: -> -> ```bash -> python -m fastanime.ensure_desktop_icon -> ``` +Working on it... ### Using pipx -Currently, this method is not functional. Please use the pip installation method instead. +working on it... ### Pre-built binaries @@ -45,23 +31,150 @@ We will soon release pre-built binaries for Linux and Windows. ### Building from the source +Requirements: + +- git +- python 3.10 and above +- poetry + To build from the source, follow these steps: 1. Clone the repository: `git clone https://github.com/Benex254/FastAnime.git` 2. Navigate into the folder: `cd FastAnime` -3. create the virtual environment: `python -m venv .venv` -4. Activate the virtual environment: `source .venv/bin/activate` or on windows `.venv/scripts/activate` -5. Install dependencies: `pip install -r requirements.txt` -6. Build the app with: `python -m build`; ensure build is installed first. -7. Navigate to the dist folder: `cd dist` -8. Install the app with: `pip install fastanime-0.2.0-py3-none-any.whl` +3. Install the Dependencies with **poetry**: `poetry install` +4. Install the app -## Major Dependencies +```bash +# normal Installation +poetry build +cd dist +pip install fastanime.whl -- Kivy and KivyMD for the UI -- PyShortcuts for creating a desktop icon -- FuzzyWuzzy for auto-selecting search results from the provider -- yt-dlp for downloading anime and getting the stream urls for trailers +# editable installation +# which is currently the easiest way to update since all you have to do is git pull +pip install -e . + +# FastAnime should now be installed and available as fastanime +# test if everything was success by running +fastanime --version + +``` + +5. Enjoy + +> [**Tip**]! +> To add completions: +> Fish Users: `cp $FASTANIME_PATH/completions/fastanime.fish ~/.config/fish/completions/` +> Bash Users: `source $FASTANIME_PATH/completions/fastanime.bash` in your `.bashrc file` +> Zsh Users: `source $FASTANIME_PATH/completions/fastanime.zsh` in your `.zshrc file` + +## Usage + +The app is meant to be flexible with its usage offering both a graphical interface and commandline interface. + +> **_NOTE:_** +> The GUI is currently in dev mode and is actively being worked on so enjoy the cli for now + +### The Commandline interface :fire: + +Made for power users who love the terminal and hate the annoying ads and inefficiency of interacting with browsers. + +Overview of main commands: + +- `fastanime anilist # :fire: most powerful and useful command for streaming` +- `fastanime download # download anime` +- `fastanime search # basic streaming functionality` +- `fastanime downloads # view your downloads` +- `fastanime config # edit your config` + +The following options are available to edit your config during run time: + +- `--continue # default` / `--no-continue` to set to continue from your watch history +- `downloads-dir ` to set the downloads diretory +- `--quality ` to set the quality of the streams +- `--auto-next # flag` to automatically go to the next episode +- `--server ` your preferred server + +#### The anilist command + +The most useful command if you prefer to stream anime and prefer doing everything from the terminal. Cause its just way more effecient. If you haven't tried, try it, your productivity would skyrocket. +The command uses the **Anilist api** to provide a rich experience similar if not better than your traditional ad filled site. + +##### Running without any subcommand + +If you run the command `fastanime anilist` by itself you will reach the main interface. + +##### Sub commands + +The following subcommands are available for convinience and quick navigation: + +- `fastanime anilist trending` to get the top 15 trending anime. +- `fastanime anilist recent` to get the top 15 recently updated anime. +- `fastanime anilist search` to search for anime and get the top 50 results. +- `fastanime anilist upcoming` to get the top 15 most scored anime. +- `fastanime anilist popular` to get the top 15 most popular anime. +- `fastanime anilist favourites` to get the top 15 most favourite anime. + +#### download subcommand + +Useful for downloading anime. +**syntax:** + +```bash +# basic command, will download all available episodes +fastanime download + +# specifying episode range to download +fastanime download -r - +``` + +#### search subcommand + +Directly interacts with the provider offering a more minimal ui and ux. + +**syntax:** + +```bash +fastanime search +``` + +#### downloads subcommand + +Convinience command to view your downloads and stream them with mpv. +**syntax:** + +```bash +fastanime downloads +``` + +#### config subcommand + +Convinience command to edit your fastanime config with your preferred editor. Looks for `$EDITOR` environment variable +**syntax:** + +```bash +fastanime config +``` + +## Configuration + +The app comes with sensible defaults but if you wish to extend it to fit more to your use case it is super easy. +The config is in the `.ini` format and located `~/.config/FastAnime/config.ini` + +```ini +[stream] +continue_from_history = True # whether to auto continue from where you left of based on your watch history +translation_type = sub # preffered language for anime. options: [dub,sub] +server=top # the default server [dropbox,sharepoint,wetransfer.gogoanime]. "top" auto selects the best +auto_next = False # whether to automatically select the next episode. Useful for binging + +[general] +preferred_language = romaji # the language used for the display name. acceptable [english,romaji] +downloads_dir=/FastAnime # set where downlad videos are to be stored + +[anilist] +# not implemented +``` ## Contributing @@ -69,16 +182,12 @@ We welcome your issues and feature requests. However, we currently have no plans ## Receiving Support -If you have any inquiries, join our [Discord Server](https://discord.gg/4NUTj5Pt). +If you have any inquiries, join our [Discord Server](https://discord.gg/4NUTj5Pt). [![Join our Discord server!](https://invidget.switchblade.xyz/4NUTj5Pt)](http://discord.gg/4NUTj5Pt) - ## Supporting the Project If you want to support the project, please consider leaving a star on our GitHub repository or [buying us a coffee](https://ko-fi.com/benex254). We appreciate both! ## demo-video -[![Watch the video](https://img.youtube.com/vi/aHRlxmxo6rY/0.jpg)](https://www.youtube.com/watch?v=aHRlxmxo6rY) - - diff --git a/fastanime/cli/__init__.py b/fastanime/cli/__init__.py index 033bdb0..0699e0b 100644 --- a/fastanime/cli/__init__.py +++ b/fastanime/cli/__init__.py @@ -45,12 +45,12 @@ signal.signal(signal.SIGINT, handle_exit) "--server", type=click.Choice(SERVERS_AVAILABLE, case_sensitive=False), ) -@click.option("-c-h/-no-h", "--continue_h/--no-continue_h", type=bool) +@click.option("-c/-no-c", "--continue/--no-continue", "continue_", type=bool) @click.option("-q", "--quality", type=int) -@click.option("-t-t", "--translation_type") -@click.option("-a-n", "--auto-next", type=bool) +@click.option("-t", "--translation_type") +@click.option("-a", "--auto-next", type=bool) @click.option( - "-s-b", + "-S", "--sort-by", type=click.Choice(anilist_sort_normalizer.keys()), # pyright: ignore ) @@ -59,7 +59,7 @@ signal.signal(signal.SIGINT, handle_exit) def run_cli( ctx: click.Context, server, - continue_h, + continue_, translation_type, quality, auto_next, @@ -69,8 +69,8 @@ def run_cli( ctx.obj = Config() if server: ctx.obj.server = server - if continue_h: - ctx.obj.continue_from_history = continue_h + if continue_: + ctx.obj.continue_from_history = continue_ if quality: ctx.obj.quality = quality if auto_next: