Metadata-Version: 2.4
Name: rcdl
Version: 3.0.0b47
Summary: Coomer/Kemono CLI Downloader
Keywords: downloader,video,media
Author: Anonymous
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Dist: click>=8.2
Requires-Dist: requests>=2.32
Requires-Dist: pathvalidate==3.3.1
Requires-Dist: rich==14.2.0
Requires-Dist: streamlit==1.52.2
Requires-Dist: fastapi==0.128.0
Requires-Dist: uvicorn==0.40.0
Requires-Dist: appdirs==1.4.4
Requires-Dist: beautifulsoup4==4.14.3

# RCDL

Riton Coomer Download Manager  
`rcdl` is a tool to automatically download the videos of your favorites creators from [coomer.st](https://coomer.st) and [kemono.cr](https://kemono.cr)


## Install
### Dependencies
- [yt-dlp](https://github.com/yt-dlp/yt-dlp)
- [aria2](https://github.com/aria2/aria2)
- [ffmpeg](https://www.ffmpeg.org/download.html) (Only for `fuse` command)  
- [HandBrakeCLI](https://handbrake.fr/docs/en/latest/cli/cli-options.html) (Only for `opti` command)  
Recommended install methods:
```bash
pipx install yt-dlp
sudo apt update
sudo apt install aria2 ffmpeg handbrake-cli -y
```
### Install RCDL
It is recommended to use `pipx` to install `rcdl`
```bash
pipx install rcdl   # recommended method
pip install rcdl    # alternative
```

## How to use

Run the CLI with:

```bash
rcdl --help
```

The first run will prompt you to enter the path you want rcdl to live in. Cache, configuration and log file will be in a hidden `.cache/` folder.

Main function:  
```bash
rcdl refresh         # look creators.json and find all possible videos
    --max-fail-count # Set maximum number of failed attempt before skipping entirely the refresh
rcdl dlsf            # download all found videos
    --max-fail-count # Set maximum number of failed attempt before skipping entirely the refresh
rcdl discover        # Discover new creator (WIP)
    --tag            # tag to be searched for
    --max-page       # number of page to search for (default: 10)
rcdl opti            # Optimized video to reduce disk storage usage
rcdl fuse            # Fuse all videos within a same post if they are fully downloaded
```

Manage creators:  
```bash
rcdl list                       # list all current creators
rcdl add [URL]                  # add a new creator with an url
rcdl add [service]/[creator_id] # add a new creator with service/creator_id
rcdl remove [creator_id]        # remove creator with a creator_id
```

Helper function:  
```bash
rcdl status          # give number of entry in the database per tables and status
rcdl repair          # repair database to match database state to the system file state
rcdl clean --all     # remove all partially downloaded file, external dependencies cache, etc...
    --partial        # remove partially downloaded file
    --cache          # remove aria2 and yt-dlp cache
    --medias-deleted # delete all media set to DELETED in db
    --all            # set all above flags to true
rcdl show-config     # print all config var and theirs value (paths, etc...)
```

Other:
```bash
rcdl --version      # see version of program
rcdl --debug [CMD]  # run in debug mode; Only for dev
```

### Settings
Default settings file:
```toml
[app]
default_max_page = 10
max_fail_count = 7
timeout = 10

[fuse]
max_width = 1920
max_height = 1080
fps = 30
preset = "veryfast"
threads = 0

[paths]
handbrake_run_cmd = "HandBrakeCLI"
```

In `rcdl/.cache/config.toml`:
```toml
[paths]
handbrake_run_cmd = "HandBrakeCLI"  # if installed via apt
handbrake_run_cmd = "flatpak run --command=HandBrakeCLI fr.handbrake.ghb"   # if installed via flatpak
```

## Dev
### Install
```bash
git clone https://github.com/ritonun/cdl.git rcdl
cd rcdl
uv run rcdl
```

Install dev depencies:
```bash
uv add build twine pylint pdoc
```

### Deploy
```bash
python3 -m pip install --upgrade build
python3 -m pip install --upgrade twine
```

### Pylint
```bash
pylint --recursive=y rcdl/ > pylint.txt
```

## Major Version History
### v3
- opti, status, clean, repair command & multiple --options flag
- GUI
- Major DB improvements
- Config files
- First run bootstrap

### v2
- UI update
- DB impromevent
- creator, fuse command 

### v1
- First release of the project, prototype
