Formats internal playlists. The process includes [URL normalization](https://en.wikipedia.org/wiki/URI_normalization), duplicate removal, removing invalid IDs, and sorting links by channel name, quality, and label.
```sh
# format all playlists in the streams/ directory
npm run playlist:format
# format a specific playlist
npm run playlist:format path/to/playlist.m3u
```
## playlist:update
Triggers an update of internal playlists. The process involves processing approved requests from issues.
```sh
npm run playlist:update
```
## playlist:generate
Generates all public playlists.
```sh
npm run playlist:generate
```
## playlist:validate
Checks IDs and links in internal playlists for errors.
```sh
# check all playlists in the streams/ directory
npm run playlist:validate
# check a specific playlist
npm run playlist:validate path/to/playlist.m3u
```
## playlist:lint
Checks internal playlists for syntax errors.
```sh
# check all playlists in the streams/ directory
npm run playlist:lint
# check a specific playlist
npm run playlist:lint path/to/playlist.m3u
```
## playlist:test
Tests links in internal playlists.
```sh
# check all playlists in the streams/ directory
npm run playlist:test
# check a specific playlist
npm run playlist:test path/to/playlist.m3u
```
This command will run an automatic check of all links in the playlist and display their status:
Also, if you add the `--fix` option to the command, the script will automatically remove all broken streams it finds from your local copy of the playlists:
```sh
npm run playlist:test streams/fr.m3u -- --fix
```
## playlist:edit
A utility for quick streams mapping.
```sh
npm run playlist:edit path/to/playlist.m3u
```
## playlist:export
Creates a JSON file with all streams for the [iptv-org/api](https://github.com/iptv-org/api) repository.
```sh
npm run playlist:export
```
## readme:update
Updates the configuration and list of available streams in [PLAYLISTS.md](PLAYLISTS.md).
```sh
npm run readme:update
```
## report:create
Creates a report on current issues.
```sh
npm run report:create
```
## lint
Checks the utility scripts themselves for syntax errors.