README.md

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