update/reorganise readme

This commit is contained in:
onyx-and-iris 2025-06-14 17:03:49 +01:00
parent eeb789003b
commit 64c1cb8fbe

View File

@ -7,23 +7,37 @@ Send Voicemeeter/Matrix vban requests.
For an outline of past/future changes refer to: [CHANGELOG](CHANGELOG.md) For an outline of past/future changes refer to: [CHANGELOG](CHANGELOG.md)
## Tested against ---
- Basic 1.1.1.8 ## Table of Contents
- Banana 2.1.1.8
- Potato 3.1.1.8 - [Installation](#installation)
- Matrix 1.0.1.2 - [VBANTXT Package](#vbantxt-package)
- [VBANTXT CLI](#vbantxt-cli)
- [License](#license)
## Requirements ## Requirements
- [Voicemeeter](https://voicemeeter.com/) or [Matrix](https://vb-audio.com/Matrix/) - [Voicemeeter](https://voicemeeter.com/) or [Matrix](https://vb-audio.com/Matrix/)
- Go 1.18 or greater (if you want to compile yourself, otherwise check `Releases`) - Go 1.18 or greater (a binary is available in [Releases](https://github.com/onyx-and-iris/vbantxt/releases))
## Tested against
- Basic 1.1.1.9
- Banana 2.1.1.9
- Potato 3.1.1.9
- Matrix 1.0.1.2
## Installation
```console
go get github.com/onyx-and-iris/vbantxt
```
--- ---
## `Use` ## `VBANTXT Package`
`go get github.com/onyx-and-iris/vbantxt`
```go ```go
package main package main
@ -55,35 +69,49 @@ func main() {
} }
``` ```
## `Command Line` ## `VBANTXT CLI`
### Use
Simply pass your vban commands as commane line arguments:
```console
vbantxt "strip[0].mute=1 strip[1].mono=1"
```
### Configuration ### Configuration
#### Flags #### Flags
- --host/-H: defaults to localhost ```console
- --port/-p: defaults to 6980 FLAGS
- --streamname/-s: defaults to Command1 -H, --host STRING VBAN host (default: localhost)
- --config/-C: defaults to `$XDG_CONFIG_HOME / vbantxt / config.toml` -p, --port INT VBAN port (default: 6980)
- --loglevel/-l: defaults to warn -s, --streamname STRING VBAN stream name (default: Command1)
- --version/-v: print the vbantxt version and exit -b, --bps INT VBAN BPS (default: 256000)
-n, --channel INT VBAN channel (default: 0)
-r, --ratelimit INT VBAN rate limit (ms) (default: 20)
-C, --config STRING Path to the configuration file (default: $XDG_CONFIG_HOME/vbantxt/config.toml)
-l, --loglevel STRING Log level (debug, info, warn, error, fatal, panic) (default: warn)
-v, --version Show version information
```
For example: Pass --host, --port and --password as flags on the root command, for example:
```console ```console
vbantxt --host="gamepc.local" --port=6980 --streamname=Command1 "strip[0].mute=1 strip[1].mono=1" vbantxt --host=localhost --port=6980 --streamname=Command1 --help
``` ```
#### Environment Variables #### Environment Variables
Load the following values from your environment: All flags have corresponding environment variables, prefixed with `VBANTTXT_`:
```bash ```bash
#!/usr/bin/env bash #!/usr/bin/env bash
export VBANTXT_HOST=localhost export VBANTXT_HOST=localhost
export VBANTXT_PORT=6980 export VBANTXT_PORT=6980
export VBANTXT_STREAMNAME=onyx export VBANTXT_STREAMNAME=Command1
``` ```
Flags will override environment variables. Flags will override environment variables.
@ -93,8 +121,9 @@ Flags will override environment variables.
By default the config loader will look for a config in: By default the config loader will look for a config in:
- $XDG_CONFIG_HOME / vbantxt / config.toml (see [os.UserConfigDir](https://pkg.go.dev/os#UserConfigDir)) - $XDG_CONFIG_HOME / vbantxt / config.toml (see [os.UserConfigDir](https://pkg.go.dev/os#UserConfigDir))
- A custom config path may be passed with the --config/-C flag.
A valid config.toml might look like this: All flags have corresponding keys in the config file, for example:
```toml ```toml
host="gamepc.local" host="gamepc.local"
@ -102,8 +131,6 @@ port=6980
streamname="Command1" streamname="Command1"
``` ```
A custom config path may be passed with the --config/-C flag.
--- ---
## `Script files` ## `Script files`
@ -162,3 +189,8 @@ vbantxt --loglevel=debug "bus[0].eq.on=1 bus[1].gain=-12.8"
``` ```
The default log level is `warn` if the flag is not specified. The default log level is `warn` if the flag is not specified.
## License
`vbantxt` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.