Compare commits

..

No commits in common. "9a15ad98a8ccfd93368c874aa61201f52c24e6c9" and "eeb789003bae6003f58cb59292013fb9dbfa24bd" have entirely different histories.

View File

@ -7,37 +7,23 @@ 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
## Table of Contents - Basic 1.1.1.8
- Banana 2.1.1.8
- [Installation](#installation) - Potato 3.1.1.8
- [VBANTXT Package](#vbantxt-package) - Matrix 1.0.1.2
- [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 (a binary is available in [Releases](https://github.com/onyx-and-iris/vbantxt/releases)) - Go 1.18 or greater (if you want to compile yourself, otherwise check `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
```
--- ---
## `VBANTXT Package` ## `Use`
`go get github.com/onyx-and-iris/vbantxt`
```go ```go
package main package main
@ -69,49 +55,35 @@ func main() {
} }
``` ```
## `VBANTXT CLI` ## `Command Line`
### Use
Simply pass your vban commands as commane line arguments:
```console
vbantxt "strip[0].mute=1 strip[1].mono=1"
```
### Configuration ### Configuration
#### Flags #### Flags
```console - --host/-H: defaults to localhost
FLAGS - --port/-p: defaults to 6980
-H, --host STRING VBAN host (default: localhost) - --streamname/-s: defaults to Command1
-p, --port INT VBAN port (default: 6980) - --config/-C: defaults to `$XDG_CONFIG_HOME / vbantxt / config.toml`
-s, --streamname STRING VBAN stream name (default: Command1) - --loglevel/-l: defaults to warn
-b, --bps INT VBAN BPS (default: 256000) - --version/-v: print the vbantxt version and exit
-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
```
Pass --host, --port and --streamname as flags on the root command, for example: For example:
```console ```console
vbantxt --host=localhost --port=6980 --streamname=Command1 --help vbantxt --host="gamepc.local" --port=6980 --streamname=Command1 "strip[0].mute=1 strip[1].mono=1"
``` ```
#### Environment Variables #### Environment Variables
All flags have corresponding environment variables, prefixed with `VBANTXT_`: Load the following values from your environment:
```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=Command1 export VBANTXT_STREAMNAME=onyx
``` ```
Flags will override environment variables. Flags will override environment variables.
@ -121,9 +93,8 @@ 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.
All flags have corresponding keys in the config file, for example: A valid config.toml might look like this:
```toml ```toml
host="gamepc.local" host="gamepc.local"
@ -131,6 +102,8 @@ port=6980
streamname="Command1" streamname="Command1"
``` ```
A custom config path may be passed with the --config/-C flag.
--- ---
## `Script files` ## `Script files`
@ -189,8 +162,3 @@ 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.