README.md

245 lines · 7627 bytes

  1
  2# Curd
  3
  4A cli application to stream anime with [Anilist](https://anilist.co/) integration and Discord RPC written in golang.
  5Works on Windows and Linux
  6
  7## Join the discord server
  8
  9https://discord.gg/cNaNVEE3B6
 10
 11## Demo Video
 12Normal mode:
 13
 14
 15https://github.com/user-attachments/assets/376e7580-b1af-40ee-82c3-154191f75b79
 16
 17Rofi with Image preview
 18
 19
 20https://github.com/user-attachments/assets/cbf799bc-9fdd-4402-ab61-b4e31f1e264d
 21
 22
 23## Features
 24- Stream anime online
 25- Update anime in Anilist after completion
 26- Skip anime Intro and Outro
 27- Skip Filler and Recap episodes
 28- Discord RPC about the anime
 29- Rofi support
 30- Image preview in rofi
 31- Local anime history to continue from where you left off last time
 32- Save mpv speed for next episode
 33- Configurable through config file
 34
 35
 36## Installing and Setup
 37> **Note**: `Curd` requires `mpv`, `rofi`, and `ueberzugpp` for Rofi support and image preview. These are included in the installation instructions below for each distribution.
 38
 39### Linux
 40<details>
 41<summary>Arch Linux / Manjaro (AUR-based systems)</summary>
 42
 43Using Yay:
 44
 45```bash
 46yay -Sy curd
 47```
 48
 49or using Paru:
 50
 51```bash
 52paru -Sy curd
 53```
 54
 55Or, to manually clone and install:
 56
 57```bash
 58git clone https://aur.archlinux.org/curd.git
 59cd curd
 60makepkg -si
 61sudo pacman -S rofi ueberzugpp
 62```
 63</details>
 64
 65<details>
 66<summary>Debian / Ubuntu (and derivatives)</summary>
 67
 68```bash
 69sudo apt update
 70sudo apt install mpv curl rofi ueberzugpp
 71curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd
 72chmod +x curd
 73sudo mv curd /usr/bin/
 74curd
 75```
 76</details>
 77
 78<details>
 79<summary>Fedora Installation</summary>
 80
 81```bash
 82sudo dnf update
 83sudo dnf install mpv curl rofi ueberzugpp
 84curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd
 85chmod +x curd
 86sudo mv curd /usr/bin/
 87curd
 88```
 89</details>
 90
 91<details>
 92<summary>openSUSE Installation</summary>
 93
 94```bash
 95sudo zypper refresh
 96sudo zypper install mpv curl rofi ueberzugpp
 97curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd
 98chmod +x curd
 99sudo mv curd /usr/bin/
100curd
101```
102</details>
103
104<details>
105<summary>NixOS Installation</summary>
106
1071. Add curd as a flake input, for example:
108```nix
109{
110    inputs = {
111        nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
112        curd = {
113            url = "github:Wraient/curd";
114            inputs.nixpkgs.follows = "nixpkgs";
115        };
116    }
117}
118```
1192. Install the package, for example:
120```nix
121{inputs, pkgs, ...}: {
122  environment.systemPackages = [
123    inputs.curd.packages.${pkgs.system}.default
124  ];
125}
126```
127
128</details>
129
130<details>
131<summary>Generic Installation</summary>
132
133```bash
134# Install mpv, curl, rofi, and ueberzugpp (required for image preview)
135curl -Lo curd https://github.com/Wraient/curd/releases/latest/download/curd
136chmod +x curd
137sudo mv curd /usr/bin/
138curd
139```
140</details>
141
142<details>
143<summary>Uninstallation</summary>
144
145```bash
146sudo rm /usr/bin/curd
147```
148
149For AUR-based distributions:
150
151```bash
152yay -R curd
153```
154</details>
155
156### [Windows Installer](https://github.com/Wraient/curd/releases/latest/download/CurdInstaller.exe)
157
158## Usage
159
160Run `curd` with the following options:
161
162```bash
163curd [options]
164```
165
166### Options
167
168> **Note**:
169> - To use rofi you need rofi and ueberzug installed.
170> - Rofi .rasi files are at default `~/.local/share/curd/`
171> - You can edit them as you like.
172> - If there are no rasi files with specific names, they would be downloaded from this repo.
173
174| Flag                      | Description                                                             | Default       |
175|---------------------------|-------------------------------------------------------------------------|---------------|
176| `-c`                      | Continue the last episode                                              | -             |
177| `-change-token`           | Change your authentication token                                       | -             |
178| `-dub`                    | Watch the dubbed version of the anime                                  | -             |
179| `-sub`                    | Watch the subbed version of the anime                                  | -             |
180| `-new`                    | Add a new anime to your list                                           | -             |
181| `-e`                      | Edit the configuration file                                            | -             |
182| `-skip-op`                | Automatically skip the opening section of each episode                 | `true`        |
183| `-skip-ed`                | Automatically skip the ending section of each episode                  | `true`        |
184| `-skip-filler`            | Automatically skip filler episodes                                     | `true`        |
185| `-skip-recap`             | Automatically skip recap sections                                      | `true`        |
186| `-discord-presence`       | Enable or disable Discord presence                                     | `true`        |
187| `-image-preview`          | Show an image preview of the anime                                     | -             |
188| `-no-image-preview`       | Disable image preview                                                  | -             |
189| `-next-episode-prompt`    | Prompt for the next episode after completing one                       | -             |
190| `-rofi`                   | Open anime selection in the rofi interface                             | -             |
191| `-no-rofi`                | Disable rofi interface                                                 | -             |
192| `-percentage-to-mark-complete` | Set the percentage watched to mark an episode as complete       | `85`          |
193| `-player`                 | Specify the player to use for playback                                 | `"mpv"`       |
194| `-save-mpv-speed`         | Save the current MPV speed setting for future sessions                 | `true`        |
195| `-score-on-completion`    | Prompt to score the episode on completion                              | `true`        |
196| `-storage-path`           | Path to the storage directory                                          | `"$HOME/.local/share/curd"` |
197| `-subs-lang`              | Set the language for subtitles                                         | `"english"`   |
198| `-u`                      | Update the script                                                      | -             |
199
200### Examples
201
202- **Continue the Last Episode**:
203  ```bash
204  curd -c
205  ```
206
207- **Add a New Anime**:
208  ```bash
209  curd -percentage-to-mark-complete=90
210  ```
211
212- **Play with Rofi and Image Preview**:
213  ```bash
214  curd -rofi -image-preview
215  ```
216
217## Configuration
218
219All configurations are stored in a file you can edit with the `-e` option.
220
221```bash
222curd -e
223```
224
225Script is made in a way that you use it for one session of watching.
226
227You can quit it anytime and the resume time would be saved in the history file
228
229more settings can be found at config file.
230config file is located at ```~/.config/curd/curd.conf```
231
232## Dependencies
233- mpv - Video player (vlc support might be added later)
234- rofi - Selection menu
235- ueberzug - Display images in rofi
236    
237## API Used
238- [Anilist API](https://anilist.gitbook.io/anilist-apiv2-docs) - Update user data and download user data
239- [AniSkip API](https://api.aniskip.com/api-docs) - Get anime intro and outro timings
240- [AllAnime Content](https://allanime.to/) - Fetch anime url
241- [Jikan](https://jikan.moe/) - Get filler episode number
242
243## Credits
244- [ani-cli](https://github.com/pystardust/ani-cli) - Code for fetching anime url
245- [jerry](https://github.com/justchokingaround/jerry) - For the inspiration