Remove library & refactor cli

This commit is contained in:
bytedream 2022-06-27 22:33:26 +02:00
parent 0fed0f8d3b
commit 8a3e42e4d1
45 changed files with 117 additions and 3687 deletions

View file

@ -1,41 +1,42 @@
# crunchyroll-go
# crunchy-cli
A [Go](https://golang.org) library & cli for the undocumented [crunchyroll](https://www.crunchyroll.com) api. To use it, you need a crunchyroll premium account to for full (api) access.
A [go](https://golang.org) written cli client for [crunchyroll](https://www.crunchyroll.com). To use it, you need a crunchyroll premium account to for full (api) access.
<p align="center">
<a href="https://github.com/ByteDream/crunchyroll-go">
<img src="https://img.shields.io/github/languages/code-size/ByteDream/crunchyroll-go?style=flat-square" alt="Code size">
<a href="https://github.com/ByteDream/crunchy-cli">
<img src="https://img.shields.io/github/languages/code-size/ByteDream/crunchy-cli?style=flat-square" alt="Code size">
</a>
<a href="https://github.com/ByteDream/crunchyroll-go/releases/latest">
<img src="https://img.shields.io/github/downloads/ByteDream/crunchyroll-go/total?style=flat-square" alt="Download Badge">
<a href="https://github.com/ByteDream/crunchy-cli/releases/latest">
<img src="https://img.shields.io/github/downloads/ByteDream/crunchy-cli/total?style=flat-square" alt="Download Badge">
</a>
<a href="https://github.com/ByteDream/crunchyroll-go/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/ByteDream/crunchyroll-go?style=flat-square" alt="License">
<a href="https://github.com/ByteDream/crunchy-cli/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/ByteDream/crunchy-cli?style=flat-square" alt="License">
</a>
<a href="https://golang.org">
<img src="https://img.shields.io/github/go-mod/go-version/ByteDream/crunchyroll-go?style=flat-square" alt="Go version">
<img src="https://img.shields.io/github/go-mod/go-version/ByteDream/crunchy-cli?style=flat-square" alt="Go version">
</a>
<a href="https://github.com/ByteDream/crunchyroll-go/releases/latest">
<img src="https://img.shields.io/github/v/release/ByteDream/crunchyroll-go?style=flat-square" alt="Release">
<a href="https://github.com/ByteDream/crunchy-cli/releases/latest">
<img src="https://img.shields.io/github/v/release/ByteDream/crunchy-cli?style=flat-square" alt="Release">
</a>
<a href="https://discord.gg/gUWwekeNNg">
<img src="https://img.shields.io/discord/915659846836162561?label=discord&style=flat-square" alt="Discord">
</a>
<a href="https://github.com/ByteDream/crunchyroll-go/actions/workflows/ci.yml">
<img src="https://github.com/ByteDream/crunchyroll-go/workflows/CI/badge.svg?style=flat" alt="CI">
<a href="https://github.com/ByteDream/crunchy-cli/actions/workflows/ci.yml">
<img src="https://github.com/ByteDream/crunchy-cli/workflows/CI/badge.svg?style=flat" alt="CI">
</a>
</p>
<p align="center">
<a href="#%EF%B8%8F-cli">CLI 🖥️</a>
<a href="#-library">Library 📚</a>
<a href="#%EF%B8%8F-disclaimer">Disclaimer ☝️</a>
<a href="#-license">License ⚖</a>
</p>
_This repo was former known as **crunchyroll-go** (which still exists but now contains only the library part) but got split up into two separate repositories to provide more flexibility.
See #39 for more information._
# 🖥️ CLI
## ✨ Features
@ -46,37 +47,42 @@ A [Go](https://golang.org) library & cli for the undocumented [crunchyroll](http
## 💾 Get the executable
- 📥 Download the latest binaries [here](https://github.com/ByteDream/crunchyroll-go/releases/latest) or get it from below:
- [Linux (x64)](https://smartrelease.bytedream.org/github/ByteDream/crunchyroll-go/crunchy-{tag}_linux)
- [Windows (x64)](https://smartrelease.bytedream.org/github/ByteDream/crunchyroll-go/crunchy-{tag}_windows.exe)
- [MacOS (x64)](https://smartrelease.bytedream.org/github/ByteDream/crunchyroll-go/crunchy-{tag}_darwin)
- 📥 Download the latest binaries [here](https://github.com/ByteDream/crunchy-cli/releases/latest) or get it from below:
- [Linux (x64)](https://smartrelease.bytedream.org/github/ByteDream/crunchy-cli/crunchy-{tag}_linux)
- [Windows (x64)](https://smartrelease.bytedream.org/github/ByteDream/crunchy-cli/crunchy-{tag}_windows.exe)
- [MacOS (x64)](https://smartrelease.bytedream.org/github/ByteDream/crunchy-cli/crunchy-{tag}_darwin)
- If you use Arch btw. or any other Linux distro which is based on Arch Linux, you can download the package via the [AUR](https://aur.archlinux.org/packages/crunchyroll-go/):
```shell
$ yay -S crunchyroll-go
```
- On Windows [scoop](https://scoop.sh/) can be used to install it (added by [@AdmnJ](https://github.com/AdmnJ)):
- <del>
On Windows [scoop](https://scoop.sh/) can be used to install it (added by [@AdmnJ](https://github.com/AdmnJ)):
```shell
$ scoop bucket add extras # <- in case you haven't added the extra repository already
$ scoop install crunchyroll-go
```
- 🛠 Build it yourself. Must be done if your target platform is not covered by the [provided binaries](https://github.com/ByteDream/crunchyroll-go/releases/latest) (like Raspberry Pi or M1 Mac):
- use `make` (requires `go` to be installed):
</del>
<i>Currently not working because the repo got renamed!</i>
- 🛠 Build it yourself. Must be done if your target platform is not covered by the [provided binaries](https://github.com/ByteDream/crunchy-cli/releases/latest) (like Raspberry Pi or M1 Mac):
- use `make` (requires `go` to be installed):
```shell
$ git clone https://github.com/ByteDream/crunchyroll-go
$ cd crunchyroll-go
$ git clone https://github.com/ByteDream/crunchy-cli
$ cd crunchy-cli
$ make
$ sudo make install # <- only if you want to install it on your system
```
- use `go`:
- use `go`:
```shell
$ git clone https://github.com/ByteDream/crunchyroll-go
$ cd crunchyroll-go
$ go build -o crunchy cmd/crunchyroll-go/main.go
$ git clone https://github.com/ByteDream/crunchy-cli
$ cd crunchy-cli
$ go build -o crunchy .
```
## 📝 Examples
_Before reading_: Because of the huge functionality not all cases can be covered in the README. Make sure to check the [wiki](https://github.com/ByteDream/crunchyroll-go/wiki/Cli), further usages and options are described there.
_Before reading_: Because of the huge functionality not all cases can be covered in the README. Make sure to check the [wiki](https://github.com/ByteDream/crunchy-cli/wiki/Cli), further usages and options are described there.
### Login
@ -163,7 +169,7 @@ The following flags can be (optional) passed to modify the [archive](#archive) p
| `-l` | `--language` | Audio locale which should be downloaded. Can be used multiple times. |
| `-d` | `--directory` | Directory to download the video(s) to. |
| `-o` | `--output` | Name of the output file. |
| `-m` | `--merge` | Sets the behavior of the stream merging. Valid behaviors are 'auto', 'audio', 'video'. See the [wiki](https://github.com/ByteDream/crunchyroll-go/wiki/Cli#archive) for more information. |
| `-m` | `--merge` | Sets the behavior of the stream merging. Valid behaviors are 'auto', 'audio', 'video'. See the [wiki](https://github.com/ByteDream/crunchy-cli/wiki/Cli#archive) for more information. |
| `-c` | `--compress` | If is set, all output will be compresses into an archive. This flag sets the name of the compressed output file and the file ending specifies the compression algorithm (gzip, tar, zip are supported). |
| `-r` | `--resolution` | The resolution of the video(s). `best` for best resolution, `worst` for worst. |
| `-g` | `--goroutines` | Sets how many parallel segment downloads should be used. |
@ -198,18 +204,6 @@ These flags you can use across every sub-command:
| `-v` | Shows additional debug output. |
| `-p` | Use a proxy to hide your ip / redirect your traffic. |
# 📚 Library
Download the library via `go get`
```shell
$ go get github.com/ByteDream/crunchyroll-go/v3
```
The documentation is available on [pkg.go.dev](https://pkg.go.dev/github.com/ByteDream/crunchyroll-go/v3).
Examples how to use the library and some features of it are described in the [wiki](https://github.com/ByteDream/crunchyroll-go/wiki/Library).
# ☝️ Disclaimer
This tool is **ONLY** meant to be used for private purposes. To use this tool you need crunchyroll premium anyway, so there is no reason why rip and share the episodes.
@ -218,4 +212,4 @@ This tool is **ONLY** meant to be used for private purposes. To use this tool yo
# ⚖ License
This project is licensed under the GNU Lesser General Public License v3.0 (LGPL-3.0) - see the [LICENSE](LICENSE) file for more details.
This project is licensed under the GNU General Public License v3.0 (GPL-3.0) - see the [LICENSE](LICENSE) file for more details.