pretty print help options using tabulate

This commit is contained in:
mungai-njoroge
2023-08-29 20:40:06 +03:00
parent 13475b0630
commit 8b25a9265f
4 changed files with 65 additions and 16 deletions
+23
View File
@@ -63,6 +63,29 @@ Usage: swingmusic [options]
| `--build` | | Build the application (in development) |
```
╭────────────────────┬─────────┬───────────────────────────────────────────────────────────────────────────────╮
│ Option │ Short │ Description │
├────────────────────┼─────────┼───────────────────────────────────────────────────────────────────────────────┤
│ --help │ -h │ Show this help message │
├────────────────────┼─────────┼───────────────────────────────────────────────────────────────────────────────┤
│ --version │ -v │ Show the app version │
├────────────────────┼─────────┼───────────────────────────────────────────────────────────────────────────────┤
│ --host │ │ Set the host │
├────────────────────┼─────────┼───────────────────────────────────────────────────────────────────────────────┤
│ --port │ │ Set the port │
├────────────────────┼─────────┼───────────────────────────────────────────────────────────────────────────────┤
│ --config │ │ Set the config path │
├────────────────────┼─────────┼───────────────────────────────────────────────────────────────────────────────┤
│ --no-periodic-scan │ -nps │ Disable periodic scan │
├────────────────────┼─────────┼───────────────────────────────────────────────────────────────────────────────┤
│ --scan-interval │ -psi │ Set the periodic scan interval in seconds. Default is 300 seconds (5 minutes) │
├────────────────────┼─────────┼───────────────────────────────────────────────────────────────────────────────┤
│ --build │ │ Build the application (in development) │
╰────────────────────┴─────────┴───────────────────────────────────────────────────────────────────────────────╯
```
To stream your music across your local network, use the `--host` flag to run the app in all ports. Like this:
```sh