2023-04-14 17:17:11 -04:00
# YTDL Web
2023-04-15 17:28:18 -04:00
2023-04-15 17:32:44 -04:00
## Usage
```sh
ytdl-web [OPTIONS]
```
Available options:
2023-04-15 18:07:48 -04:00
- -b, --base-path string the base path, used when behind reverse proxy
2023-04-15 17:32:44 -04:00
- --config string config file (default is $XDG_CONFIG_HOME/ytdl-web/config.yml)
- -h, --help help for ytdl-web
2023-04-15 18:07:48 -04:00
- -l, --listen string address to listen on (default "127.0.0.1")
- -p, --port int port to listen on (default 8080)
- -y, --ytdlp-path string the path to the yt-dlp binary, used when it is not in $PATH (default "yt-dlp")
2023-04-15 17:32:44 -04:00
2023-07-12 16:51:05 -04:00
## Configuration
### Environment variables
You can configure the application using environment variables
| Variable Name | Description | Default Value | Accepted Values |
| ---------------------------------- | ----------------------------------------------------------------------------------------------- | --------------- | ------------------------------------------------------------------------------ |
2023-07-12 19:16:28 -04:00
| YTDL_CONFIGDIR | Add a custom config directory to search for the config file | ` ` | |
2023-07-12 16:51:05 -04:00
| YTDL_ENV | The application environment | `Production` | `Development` , `Staging` , `Production` |
2024-11-07 09:03:54 -05:00
| YTDL_YTDLP_BINARYPATH | The path to the yt-dlp binary | `yt-dlp` | |
2023-07-12 16:51:05 -04:00
| YTDL_HTTP_PORT | The tcp port for the web server to listen on | `8080` | |
| YTDL_HTTP_LISTEN | The address for the web server to listen on | `127.0.0.1` | `0.0.0.0` , `127.0.0.1` , etc. |
| YTDL_HTTP_BASEPATH | The base path of the application, useful for reverse proxies | `/` | |
| YTDL_CACHE_TTL | How long to keep cached metadata | `1h` | `1h` , `30s` , `2m` , etc. |
| YTDL_CACHE_DIRPATH | The path to the directory of where to store the cache | `/tmp/ytdl-web` | |
| YTDL_COOKIES_ENABLED | Whether to use cookies when using yt-dlp | `true` | `true` or `false` |
| YTDL_COOKIES_FILEPATH | The path to the netscape format cookies file | `./cookies.txt` | |
2023-07-12 19:16:28 -04:00
| YTDL_COOKIES_FROMBROWSER_BROWSER | The name of the browser to load cookies from. (if specified, it disables YTDL_COOKIES_FILEPATH) | ` ` | `brave` , `chrome` , `chromium` , `edge` , `firefox` , `opera` , `safari` , `vivaldi` |
| YTDL_COOKIES_FROMBROWSER_KEYRING | The name of the keyring for decrypting cookies for the chromium browser on linux | ` ` | `basictext` , `gnomekeyring` , `kwallet` |
| YTDL_COOKIES_FROMBROWSER_PROFILE | The browser profile to load cookies from | ` ` | |
2024-04-16 09:59:09 -04:00
| YTDL_COOKIES_FROMBROWSER_CONTAINER | The container name (if firefox) to load the cookies from | ` ` | |
2023-07-12 16:51:05 -04:00
2023-04-15 17:32:44 -04:00
## Building from source
Prerequisites:
2023-07-12 16:56:48 -04:00
- [devenv ](https://devenv.sh/getting-started/ )
2023-04-15 17:32:44 -04:00
Steps:
2023-07-12 16:56:12 -04:00
1. Enter devenv shell
2023-04-15 17:32:44 -04:00
2023-07-12 16:56:26 -04:00
```sh
devenv shell
```
2023-07-12 16:56:12 -04:00
2. Run the build script
2023-04-15 17:32:44 -04:00
```sh
2023-07-12 16:56:12 -04:00
build
2023-04-15 17:32:44 -04:00
```
2023-04-15 18:24:23 -04:00
## Releasing
Prerequisites:
2023-07-12 16:51:05 -04:00
- [devenv ](https://devenv.sh/getting-started/ )
2023-04-15 18:24:23 -04:00
Steps:
1. Ensure gitea access token is in `~/.config/goreleaser/gitea_token`
2023-07-12 16:56:12 -04:00
2. Enter devenv shell
```sh
devenv shell
```
3. Run the release script
2023-04-15 18:24:23 -04:00
```sh
2023-07-12 16:56:12 -04:00
release
2023-04-15 18:24:23 -04:00
```
2023-04-15 19:43:21 -04:00
## Contributing
Please read [CONTRIBUTING.md ](./CONTRIBUTING.md ) for details on our code of conduct, and the process for submitting pull requests to us.
## Versioning
We use [Semantic Versioning ](http://semver.org/ ) for versioning. For the versions available, see the [tags on this repository ](https://git.fifitido.net/apps/ytdl-web/tags ).
## Authors
- Evan Fiordeliso - _Initial project work_ - [efiordeliso ](https://git.fifitido.net/efiordeliso )
- Billie Thompson - _Provided README Template_ - [PurpleBooth ](https://github.com/PurpleBooth )
## License
The project is licensed under the [GPL v3 ](./LICENSE.md ) License - see the [LICENSE.md ](./LICENSE.md ) file for details.