mirror of
https://github.com/onyx-and-iris/gobs-cli.git
synced 2026-04-18 07:03:37 +00:00
Merge branch 'customise-completion'
This commit is contained in:
24
.gitignore
vendored
24
.gitignore
vendored
@@ -1,6 +1,6 @@
|
|||||||
# Auto-generated .gitignore by gignore: github.com/onyx-and-iris/gignore
|
# Generated by ignr: github.com/onyx-and-iris/ignr
|
||||||
|
|
||||||
### Go ###
|
## Go ##
|
||||||
# If you prefer the allow list template instead of the deny list, see community template:
|
# If you prefer the allow list template instead of the deny list, see community template:
|
||||||
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
||||||
#
|
#
|
||||||
@@ -15,23 +15,27 @@ bin/
|
|||||||
# Test binary, built with `go test -c`
|
# Test binary, built with `go test -c`
|
||||||
*.test
|
*.test
|
||||||
|
|
||||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
# Code coverage profiles and other test artifacts
|
||||||
*.out
|
*.out
|
||||||
|
coverage.*
|
||||||
|
*.coverprofile
|
||||||
|
profile.cov
|
||||||
|
|
||||||
# Dependency directories (remove the comment below to include it)
|
# Dependency directories (remove the comment below to include it)
|
||||||
# vendor/
|
# vendor/
|
||||||
|
|
||||||
# Go workspace file
|
# Go workspace file
|
||||||
go.work
|
go.work
|
||||||
|
go.work.sum
|
||||||
|
|
||||||
# End of gignore: github.com/onyx-and-iris/gignore
|
# env file
|
||||||
|
|
||||||
# Environment
|
|
||||||
.env
|
.env
|
||||||
.envrc
|
|
||||||
|
# Editor/IDE
|
||||||
|
# .idea/
|
||||||
|
# .vscode/
|
||||||
|
|
||||||
|
# End of ignr
|
||||||
|
|
||||||
# Man pages
|
# Man pages
|
||||||
gobs-cli.1
|
gobs-cli.1
|
||||||
|
|
||||||
# Config files
|
|
||||||
config.yaml
|
|
||||||
|
|||||||
10
filter.go
10
filter.go
@@ -13,11 +13,11 @@ import (
|
|||||||
|
|
||||||
// FilterCmd provides commands to manage filters in OBS Studio.
|
// FilterCmd provides commands to manage filters in OBS Studio.
|
||||||
type FilterCmd struct {
|
type FilterCmd struct {
|
||||||
List FilterListCmd `cmd:"" help:"List all filters." aliases:"ls"`
|
List FilterListCmd `cmd:"" help:"List all filters." aliases:"ls" completion-enabled-command-alias:"false"`
|
||||||
Enable FilterEnableCmd `cmd:"" help:"Enable filter." aliases:"on"`
|
Enable FilterEnableCmd `cmd:"" help:"Enable filter." aliases:"on" completion-enabled-command-alias:"false"`
|
||||||
Disable FilterDisableCmd `cmd:"" help:"Disable filter." aliases:"off"`
|
Disable FilterDisableCmd `cmd:"" help:"Disable filter." aliases:"off" completion-enabled-command-alias:"false"`
|
||||||
Toggle FilterToggleCmd `cmd:"" help:"Toggle filter." aliases:"tg"`
|
Toggle FilterToggleCmd `cmd:"" help:"Toggle filter." aliases:"tg" completion-enabled-command-alias:"false"`
|
||||||
Status FilterStatusCmd `cmd:"" help:"Get filter status." aliases:"ss"`
|
Status FilterStatusCmd `cmd:"" help:"Get filter status." aliases:"ss" completion-enabled-command-alias:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// FilterListCmd provides a command to list all filters in a scene.
|
// FilterListCmd provides a command to list all filters in a scene.
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -7,7 +7,7 @@ require (
|
|||||||
github.com/alecthomas/mango-kong v0.1.0
|
github.com/alecthomas/mango-kong v0.1.0
|
||||||
github.com/andreykaipov/goobs v1.8.3
|
github.com/andreykaipov/goobs v1.8.3
|
||||||
github.com/charmbracelet/lipgloss v1.1.0
|
github.com/charmbracelet/lipgloss v1.1.0
|
||||||
github.com/jotaen/kong-completion v0.0.12
|
github.com/jotaen/kong-completion v0.0.13
|
||||||
github.com/titusjaka/kong-dotenv-go v0.1.0
|
github.com/titusjaka/kong-dotenv-go v0.1.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
4
go.sum
4
go.sum
@@ -47,8 +47,8 @@ github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUq
|
|||||||
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
|
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
|
||||||
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
||||||
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||||
github.com/jotaen/kong-completion v0.0.12 h1:a9jmSaWgkdAUMQT583UxLIJrO9tfdSmYqcIxrBByjPc=
|
github.com/jotaen/kong-completion v0.0.13 h1:fbbqijMmrCgx8sz6bZz+B5p5yJSEAdwJZALsUZ+Ql3s=
|
||||||
github.com/jotaen/kong-completion v0.0.12/go.mod h1:dyIG20e3qq128SUBtF8jzI7YtkfzjWMlgbqkAJd6xHQ=
|
github.com/jotaen/kong-completion v0.0.13/go.mod h1:dyIG20e3qq128SUBtF8jzI7YtkfzjWMlgbqkAJd6xHQ=
|
||||||
github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4=
|
github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4=
|
||||||
github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
||||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||||
|
|||||||
10
group.go
10
group.go
@@ -10,11 +10,11 @@ import (
|
|||||||
|
|
||||||
// GroupCmd provides commands to manage groups in OBS Studio.
|
// GroupCmd provides commands to manage groups in OBS Studio.
|
||||||
type GroupCmd struct {
|
type GroupCmd struct {
|
||||||
List GroupListCmd `cmd:"" help:"List all groups." aliases:"ls"`
|
List GroupListCmd `cmd:"" help:"List all groups." aliases:"ls" completion-enabled-command-alias:"false"`
|
||||||
Show GroupShowCmd `cmd:"" help:"Show group details." aliases:"sh"`
|
Show GroupShowCmd `cmd:"" help:"Show group details." aliases:"sh" completion-enabled-command-alias:"false"`
|
||||||
Hide GroupHideCmd `cmd:"" help:"Hide group." aliases:"h"`
|
Hide GroupHideCmd `cmd:"" help:"Hide group." aliases:"h" completion-enabled-command-alias:"false"`
|
||||||
Toggle GroupToggleCmd `cmd:"" help:"Toggle group." aliases:"tg"`
|
Toggle GroupToggleCmd `cmd:"" help:"Toggle group." aliases:"tg" completion-enabled-command-alias:"false"`
|
||||||
Status GroupStatusCmd `cmd:"" help:"Get group status." aliases:"ss"`
|
Status GroupStatusCmd `cmd:"" help:"Get group status." aliases:"ss" completion-enabled-command-alias:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GroupListCmd provides a command to list all groups in a scene.
|
// GroupListCmd provides a command to list all groups in a scene.
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ import (
|
|||||||
|
|
||||||
// HotkeyCmd provides commands to manage hotkeys in OBS Studio.
|
// HotkeyCmd provides commands to manage hotkeys in OBS Studio.
|
||||||
type HotkeyCmd struct {
|
type HotkeyCmd struct {
|
||||||
List HotkeyListCmd `cmd:"" help:"List all hotkeys." aliases:"ls"`
|
List HotkeyListCmd `cmd:"" help:"List all hotkeys." aliases:"ls" completion-enabled-command-alias:"false"`
|
||||||
Trigger HotkeyTriggerCmd `cmd:"" help:"Trigger a hotkey by name." aliases:"tr"`
|
Trigger HotkeyTriggerCmd `cmd:"" help:"Trigger a hotkey by name." aliases:"tr" completion-enabled-command-alias:"false"`
|
||||||
TriggerSequence HotkeyTriggerSequenceCmd `cmd:"" help:"Trigger a hotkey by sequence." aliases:"trs"`
|
TriggerSequence HotkeyTriggerSequenceCmd `cmd:"" help:"Trigger a hotkey by sequence." aliases:"trs" completion-enabled-command-alias:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// HotkeyListCmd provides a command to list all hotkeys.
|
// HotkeyListCmd provides a command to list all hotkeys.
|
||||||
|
|||||||
22
input.go
22
input.go
@@ -14,17 +14,17 @@ import (
|
|||||||
|
|
||||||
// InputCmd provides commands to manage inputs in OBS Studio.
|
// InputCmd provides commands to manage inputs in OBS Studio.
|
||||||
type InputCmd struct {
|
type InputCmd struct {
|
||||||
Create InputCreateCmd `cmd:"" help:"Create input." aliases:"c"`
|
Create InputCreateCmd `cmd:"" help:"Create input." aliases:"c" completion-enabled-command-alias:"false"`
|
||||||
Remove InputRemoveCmd `cmd:"" help:"Remove input." aliases:"d"`
|
Remove InputRemoveCmd `cmd:"" help:"Remove input." aliases:"d" completion-enabled-command-alias:"false"`
|
||||||
List InputListCmd `cmd:"" help:"List all inputs." aliases:"ls"`
|
List InputListCmd `cmd:"" help:"List all inputs." aliases:"ls" completion-enabled-command-alias:"false"`
|
||||||
ListKinds InputListKindsCmd `cmd:"" help:"List input kinds." aliases:"k"`
|
ListKinds InputListKindsCmd `cmd:"" help:"List input kinds." aliases:"k" completion-enabled-command-alias:"false"`
|
||||||
Mute InputMuteCmd `cmd:"" help:"Mute input." aliases:"m"`
|
Mute InputMuteCmd `cmd:"" help:"Mute input." aliases:"m" completion-enabled-command-alias:"false"`
|
||||||
Unmute InputUnmuteCmd `cmd:"" help:"Unmute input." aliases:"um"`
|
Unmute InputUnmuteCmd `cmd:"" help:"Unmute input." aliases:"um" completion-enabled-command-alias:"false"`
|
||||||
Toggle InputToggleCmd `cmd:"" help:"Toggle input." aliases:"tg"`
|
Toggle InputToggleCmd `cmd:"" help:"Toggle input." aliases:"tg" completion-enabled-command-alias:"false"`
|
||||||
Volume InputVolumeCmd `cmd:"" help:"Set input volume." aliases:"v"`
|
Volume InputVolumeCmd `cmd:"" help:"Set input volume." aliases:"v" completion-enabled-command-alias:"false"`
|
||||||
Show InputShowCmd `cmd:"" help:"Show input details." aliases:"s"`
|
Show InputShowCmd `cmd:"" help:"Show input details." aliases:"s" completion-enabled-command-alias:"false"`
|
||||||
Update InputUpdateCmd `cmd:"" help:"Update input settings." aliases:"up"`
|
Update InputUpdateCmd `cmd:"" help:"Update input settings." aliases:"up" completion-enabled-command-alias:"false"`
|
||||||
KindDefaults InputKindDefaultsCmd `cmd:"" help:"Get default settings for an input kind." aliases:"df"`
|
KindDefaults InputKindDefaultsCmd `cmd:"" help:"Get default settings for an input kind." aliases:"df" completion-enabled-command-alias:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// InputCreateCmd provides a command to create an input.
|
// InputCreateCmd provides a command to create an input.
|
||||||
|
|||||||
52
main.go
52
main.go
@@ -34,16 +34,16 @@ func (v VersionFlag) BeforeApply(app *kong.Kong, vars kong.Vars) error { // noli
|
|||||||
|
|
||||||
// ObsConfig holds the configuration for connecting to the OBS WebSocket server.
|
// ObsConfig holds the configuration for connecting to the OBS WebSocket server.
|
||||||
type ObsConfig struct {
|
type ObsConfig struct {
|
||||||
Host string `flag:"host" help:"Host to connect to." default:"localhost" env:"OBS_HOST" short:"H"`
|
Host string `flag:"host" help:"Host to connect to." default:"localhost" env:"OBS_HOST" short:"H" completion-enabled-flag-short:"false"`
|
||||||
Port int `flag:"port" help:"Port to connect to." default:"4455" env:"OBS_PORT" short:"P"`
|
Port int `flag:"port" help:"Port to connect to." default:"4455" env:"OBS_PORT" short:"P" completion-enabled-flag-short:"false"`
|
||||||
Password string `flag:"password" help:"Password for authentication." default:"" env:"OBS_PASSWORD" short:"p"`
|
Password string `flag:"password" help:"Password for authentication." default:"" env:"OBS_PASSWORD" short:"p" completion-enabled-flag-short:"false"`
|
||||||
Timeout int `flag:"timeout" help:"Timeout in seconds." default:"5" env:"OBS_TIMEOUT" short:"T"`
|
Timeout int `flag:"timeout" help:"Timeout in seconds." default:"5" env:"OBS_TIMEOUT" short:"T" completion-enabled-flag-short:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// StyleConfig holds the configuration for styling the CLI output.
|
// StyleConfig holds the configuration for styling the CLI output.
|
||||||
type StyleConfig struct {
|
type StyleConfig struct {
|
||||||
Style string `help:"Style used in output." flag:"style" default:"" env:"GOBS_STYLE" short:"s" enum:",red,magenta,purple,blue,cyan,green,yellow,orange,white,grey,navy,black"`
|
Style string `flag:"style" help:"Style used in output." default:"" env:"GOBS_STYLE" short:"s" enum:",red,magenta,purple,blue,cyan,green,yellow,orange,white,grey,navy,black" completion-enabled-flag-short:"false"`
|
||||||
NoBorder bool `help:"Disable table border styling in output." flag:"no-border" default:"false" env:"GOBS_STYLE_NO_BORDER" short:"b"`
|
NoBorder bool `flag:"no-border" help:"Disable table border styling in output." default:"false" env:"GOBS_STYLE_NO_BORDER" short:"b" completion-enabled-flag-short:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CLI is the main command line interface structure.
|
// CLI is the main command line interface structure.
|
||||||
@@ -55,27 +55,27 @@ type CLI struct {
|
|||||||
Man mangokong.ManFlag `help:"Print man page."`
|
Man mangokong.ManFlag `help:"Print man page."`
|
||||||
Version VersionFlag `help:"Print gobs-cli version information and quit" name:"version" short:"v"`
|
Version VersionFlag `help:"Print gobs-cli version information and quit" name:"version" short:"v"`
|
||||||
|
|
||||||
Completion kongcompletion.Completion `help:"Generate shell completion scripts." cmd:"" aliases:"c"`
|
Completion kongcompletion.Completion `help:"Generate shell completion scripts." cmd:""`
|
||||||
|
|
||||||
ObsVersion ObsVersionCmd `help:"Print OBS client and websocket version." cmd:"" aliases:"v"`
|
ObsVersion ObsVersionCmd `cmd:"" help:"Print OBS client and websocket version." aliases:"v" completion-enabled-command-alias:"false"`
|
||||||
Scene SceneCmd `help:"Manage scenes." cmd:"" aliases:"sc" group:"Scene"`
|
Scene SceneCmd `cmd:"" help:"Manage scenes." aliases:"sc" completion-enabled-command-alias:"false" group:"Scene"`
|
||||||
Sceneitem SceneItemCmd `help:"Manage scene items." cmd:"" aliases:"si" group:"Scene Item"`
|
Sceneitem SceneItemCmd `cmd:"" help:"Manage scene items." aliases:"si" completion-enabled-command-alias:"false" group:"Scene Item"`
|
||||||
Group GroupCmd `help:"Manage groups." cmd:"" aliases:"g" group:"Group"`
|
Group GroupCmd `cmd:"" help:"Manage groups." aliases:"g" completion-enabled-command-alias:"false" group:"Group"`
|
||||||
Input InputCmd `help:"Manage inputs." cmd:"" aliases:"i" group:"Input"`
|
Input InputCmd `cmd:"" help:"Manage inputs." aliases:"i" completion-enabled-command-alias:"false" group:"Input"`
|
||||||
Text TextCmd `help:"Manage text inputs." cmd:"" aliases:"t" group:"Text Input"`
|
Text TextCmd `cmd:"" help:"Manage text inputs." aliases:"t" completion-enabled-command-alias:"false" group:"Text Input"`
|
||||||
Record RecordCmd `help:"Manage recording." cmd:"" aliases:"rec" group:"Recording"`
|
Record RecordCmd `cmd:"" help:"Manage recording." aliases:"rec" completion-enabled-command-alias:"false" group:"Recording"`
|
||||||
Stream StreamCmd `help:"Manage streaming." cmd:"" aliases:"st" group:"Streaming"`
|
Stream StreamCmd `cmd:"" help:"Manage streaming." aliases:"st" completion-enabled-command-alias:"false" group:"Streaming"`
|
||||||
Scenecollection SceneCollectionCmd `help:"Manage scene collections." cmd:"" aliases:"scn" group:"Scene Collection"`
|
Scenecollection SceneCollectionCmd `cmd:"" help:"Manage scene collections." aliases:"scn" completion-enabled-command-alias:"false" group:"Scene Collection"`
|
||||||
Profile ProfileCmd `help:"Manage profiles." cmd:"" aliases:"p" group:"Profile"`
|
Profile ProfileCmd `cmd:"" help:"Manage profiles." aliases:"p" completion-enabled-command-alias:"false" group:"Profile"`
|
||||||
Replaybuffer ReplayBufferCmd `help:"Manage replay buffer." cmd:"" aliases:"rb" group:"Replay Buffer"`
|
Replaybuffer ReplayBufferCmd `cmd:"" help:"Manage replay buffer." aliases:"rb" completion-enabled-command-alias:"false" group:"Replay Buffer"`
|
||||||
Studiomode StudioModeCmd `help:"Manage studio mode." cmd:"" aliases:"sm" group:"Studio Mode"`
|
Studiomode StudioModeCmd `cmd:"" help:"Manage studio mode." aliases:"sm" completion-enabled-command-alias:"false" group:"Studio Mode"`
|
||||||
Virtualcam VirtualCamCmd `help:"Manage virtual camera." cmd:"" aliases:"vc" group:"Virtual Camera"`
|
Virtualcam VirtualCamCmd `cmd:"" help:"Manage virtual camera." aliases:"vc" completion-enabled-command-alias:"false" group:"Virtual Camera"`
|
||||||
Hotkey HotkeyCmd `help:"Manage hotkeys." cmd:"" aliases:"hk" group:"Hotkey"`
|
Hotkey HotkeyCmd `cmd:"" help:"Manage hotkeys." aliases:"hk" completion-enabled-command-alias:"false" group:"Hotkey"`
|
||||||
Filter FilterCmd `help:"Manage filters." cmd:"" aliases:"f" group:"Filter"`
|
Filter FilterCmd `cmd:"" help:"Manage filters." aliases:"f" completion-enabled-command-alias:"false" group:"Filter"`
|
||||||
Projector ProjectorCmd `help:"Manage projectors." cmd:"" aliases:"prj" group:"Projector"`
|
Projector ProjectorCmd `cmd:"" help:"Manage projectors." aliases:"prj" completion-enabled-command-alias:"false" group:"Projector"`
|
||||||
Screenshot ScreenshotCmd `help:"Take screenshots." cmd:"" aliases:"ss" group:"Screenshot"`
|
Screenshot ScreenshotCmd `cmd:"" help:"Take screenshots." aliases:"ss" completion-enabled-command-alias:"false" group:"Screenshot"`
|
||||||
Settings SettingsCmd `help:"Manage video and profile settings." cmd:"" aliases:"set" group:"Settings"`
|
Settings SettingsCmd `cmd:"" help:"Manage video and profile settings." aliases:"set" completion-enabled-command-alias:"false" group:"Settings"`
|
||||||
Media MediaCmd `help:"Manage media inputs." cmd:"" aliases:"mi" group:"Media Input"`
|
Media MediaCmd `cmd:"" help:"Manage media inputs." aliases:"mi" completion-enabled-command-alias:"false" group:"Media Input"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type context struct {
|
type context struct {
|
||||||
|
|||||||
10
media.go
10
media.go
@@ -8,11 +8,11 @@ import (
|
|||||||
|
|
||||||
// MediaCmd represents a collection of commands to control media inputs.
|
// MediaCmd represents a collection of commands to control media inputs.
|
||||||
type MediaCmd struct {
|
type MediaCmd struct {
|
||||||
Cursor MediaCursorCmd `cmd:"" help:"Get/set the cursor position of a media input." aliases:"c"`
|
Cursor MediaCursorCmd `cmd:"" help:"Get/set the cursor position of a media input." aliases:"c" completion-enabled-command-alias:"false"`
|
||||||
Play MediaPlayCmd `cmd:"" help:"Plays a media input." aliases:"p"`
|
Play MediaPlayCmd `cmd:"" help:"Plays a media input." aliases:"p" completion-enabled-command-alias:"false"`
|
||||||
Pause MediaPauseCmd `cmd:"" help:"Pauses a media input." aliases:"pa"`
|
Pause MediaPauseCmd `cmd:"" help:"Pauses a media input." aliases:"pa" completion-enabled-command-alias:"false"`
|
||||||
Stop MediaStopCmd `cmd:"" help:"Stops a media input." aliases:"s"`
|
Stop MediaStopCmd `cmd:"" help:"Stops a media input." aliases:"s" completion-enabled-command-alias:"false"`
|
||||||
Restart MediaRestartCmd `cmd:"" help:"Restarts a media input." aliases:"r"`
|
Restart MediaRestartCmd `cmd:"" help:"Restarts a media input." aliases:"r" completion-enabled-command-alias:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// MediaCursorCmd represents the command to get or set the cursor position of a media input.
|
// MediaCursorCmd represents the command to get or set the cursor position of a media input.
|
||||||
|
|||||||
10
profile.go
10
profile.go
@@ -11,11 +11,11 @@ import (
|
|||||||
|
|
||||||
// ProfileCmd provides commands to manage profiles in OBS Studio.
|
// ProfileCmd provides commands to manage profiles in OBS Studio.
|
||||||
type ProfileCmd struct {
|
type ProfileCmd struct {
|
||||||
List ProfileListCmd `help:"List profiles." cmd:"" aliases:"ls"`
|
List ProfileListCmd `cmd:"" help:"List profiles." aliases:"ls" completion-enabled-command-alias:"false"`
|
||||||
Current ProfileCurrentCmd `help:"Get current profile." cmd:"" aliases:"c"`
|
Current ProfileCurrentCmd `cmd:"" help:"Get current profile." aliases:"c" completion-enabled-command-alias:"false"`
|
||||||
Switch ProfileSwitchCmd `help:"Switch profile." cmd:"" aliases:"sw"`
|
Switch ProfileSwitchCmd `cmd:"" help:"Switch profile." aliases:"sw" completion-enabled-command-alias:"false"`
|
||||||
Create ProfileCreateCmd `help:"Create profile." cmd:"" aliases:"new"`
|
Create ProfileCreateCmd `cmd:"" help:"Create profile." aliases:"new" completion-enabled-command-alias:"false"`
|
||||||
Remove ProfileRemoveCmd `help:"Remove profile." cmd:"" aliases:"rm"`
|
Remove ProfileRemoveCmd `cmd:"" help:"Remove profile." aliases:"rm" completion-enabled-command-alias:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ProfileListCmd provides a command to list all profiles.
|
// ProfileListCmd provides a command to list all profiles.
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
|
|
||||||
// ProjectorCmd provides a command to manage projectors in OBS.
|
// ProjectorCmd provides a command to manage projectors in OBS.
|
||||||
type ProjectorCmd struct {
|
type ProjectorCmd struct {
|
||||||
ListMonitors ProjectorListMonitorsCmd `cmd:"" help:"List available monitors." aliases:"ls-m"`
|
ListMonitors ProjectorListMonitorsCmd `cmd:"" help:"List available monitors." aliases:"ls-m" completion-enabled-command-alias:"false"`
|
||||||
Open ProjectorOpenCmd `cmd:"" help:"Open a fullscreen projector for a source on a specific monitor." aliases:"o"`
|
Open ProjectorOpenCmd `cmd:"" help:"Open a fullscreen projector for a source on a specific monitor." aliases:"o" completion-enabled-command-alias:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ProjectorListMonitorsCmd provides a command to list all monitors available for projectors.
|
// ProjectorListMonitorsCmd provides a command to list all monitors available for projectors.
|
||||||
|
|||||||
18
record.go
18
record.go
@@ -9,15 +9,15 @@ import (
|
|||||||
|
|
||||||
// RecordCmd handles the recording commands.
|
// RecordCmd handles the recording commands.
|
||||||
type RecordCmd struct {
|
type RecordCmd struct {
|
||||||
Start RecordStartCmd `cmd:"" help:"Start recording." aliases:"s"`
|
Start RecordStartCmd `cmd:"" help:"Start recording." aliases:"s" completion-enabled-command-alias:"false"`
|
||||||
Stop RecordStopCmd `cmd:"" help:"Stop recording." aliases:"st"`
|
Stop RecordStopCmd `cmd:"" help:"Stop recording." aliases:"st" completion-enabled-command-alias:"false"`
|
||||||
Toggle RecordToggleCmd `cmd:"" help:"Toggle recording." aliases:"tg"`
|
Toggle RecordToggleCmd `cmd:"" help:"Toggle recording." aliases:"tg" completion-enabled-command-alias:"false"`
|
||||||
Status RecordStatusCmd `cmd:"" help:"Show recording status." aliases:"ss"`
|
Status RecordStatusCmd `cmd:"" help:"Show recording status." aliases:"ss" completion-enabled-command-alias:"false"`
|
||||||
Pause RecordPauseCmd `cmd:"" help:"Pause recording." aliases:"p"`
|
Pause RecordPauseCmd `cmd:"" help:"Pause recording." aliases:"p" completion-enabled-command-alias:"false"`
|
||||||
Resume RecordResumeCmd `cmd:"" help:"Resume recording." aliases:"r"`
|
Resume RecordResumeCmd `cmd:"" help:"Resume recording." aliases:"r" completion-enabled-command-alias:"false"`
|
||||||
Directory RecordDirectoryCmd `cmd:"" help:"Get/Set recording directory." aliases:"d"`
|
Directory RecordDirectoryCmd `cmd:"" help:"Get/Set recording directory." aliases:"d" completion-enabled-command-alias:"false"`
|
||||||
Split RecordSplitCmd `cmd:"" help:"Split recording." aliases:"sp"`
|
Split RecordSplitCmd `cmd:"" help:"Split recording." aliases:"sp" completion-enabled-command-alias:"false"`
|
||||||
Chapter RecordChapterCmd `cmd:"" help:"Create a chapter in the recording." aliases:"c"`
|
Chapter RecordChapterCmd `cmd:"" help:"Create a chapter in the recording." aliases:"c" completion-enabled-command-alias:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// RecordStartCmd starts the recording.
|
// RecordStartCmd starts the recording.
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ import (
|
|||||||
|
|
||||||
// ReplayBufferCmd handles the recording commands.
|
// ReplayBufferCmd handles the recording commands.
|
||||||
type ReplayBufferCmd struct {
|
type ReplayBufferCmd struct {
|
||||||
Start ReplayBufferStartCmd `help:"Start replay buffer." cmd:"" aliases:"s"`
|
Start ReplayBufferStartCmd `cmd:"" help:"Start replay buffer." aliases:"s" completion-enabled-command-alias:"false"`
|
||||||
Stop ReplayBufferStopCmd `help:"Stop replay buffer." cmd:"" aliases:"st"`
|
Stop ReplayBufferStopCmd `cmd:"" help:"Stop replay buffer." aliases:"st" completion-enabled-command-alias:"false"`
|
||||||
Toggle ReplayBufferToggleCmd `help:"Toggle replay buffer." cmd:"" aliases:"tg"`
|
Toggle ReplayBufferToggleCmd `cmd:"" help:"Toggle replay buffer." aliases:"tg" completion-enabled-command-alias:"false"`
|
||||||
Status ReplayBufferStatusCmd `help:"Get replay buffer status." cmd:"" aliases:"ss"`
|
Status ReplayBufferStatusCmd `cmd:"" help:"Get replay buffer status." aliases:"ss" completion-enabled-command-alias:"false"`
|
||||||
Save ReplayBufferSaveCmd `help:"Save replay buffer." cmd:"" aliases:"sv"`
|
Save ReplayBufferSaveCmd `cmd:"" help:"Save replay buffer." aliases:"sv" completion-enabled-command-alias:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReplayBufferStartCmd starts the replay buffer.
|
// ReplayBufferStartCmd starts the replay buffer.
|
||||||
|
|||||||
6
scene.go
6
scene.go
@@ -11,9 +11,9 @@ import (
|
|||||||
|
|
||||||
// SceneCmd provides commands to manage scenes in OBS Studio.
|
// SceneCmd provides commands to manage scenes in OBS Studio.
|
||||||
type SceneCmd struct {
|
type SceneCmd struct {
|
||||||
List SceneListCmd `cmd:"" help:"List all scenes." aliases:"ls"`
|
List SceneListCmd `cmd:"" help:"List all scenes." aliases:"ls" completion-enabled-command-alias:"false"`
|
||||||
Current SceneCurrentCmd `cmd:"" help:"Get the current scene." aliases:"c"`
|
Current SceneCurrentCmd `cmd:"" help:"Get the current scene." aliases:"c" completion-enabled-command-alias:"false"`
|
||||||
Switch SceneSwitchCmd `cmd:"" help:"Switch to a scene." aliases:"sw"`
|
Switch SceneSwitchCmd `cmd:"" help:"Switch to a scene." aliases:"sw" completion-enabled-command-alias:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SceneListCmd provides a command to list all scenes.
|
// SceneListCmd provides a command to list all scenes.
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ import (
|
|||||||
|
|
||||||
// SceneCollectionCmd provides commands to manage scene collections in OBS Studio.
|
// SceneCollectionCmd provides commands to manage scene collections in OBS Studio.
|
||||||
type SceneCollectionCmd struct {
|
type SceneCollectionCmd struct {
|
||||||
List SceneCollectionListCmd `help:"List scene collections." cmd:"" aliases:"ls"`
|
List SceneCollectionListCmd `cmd:"" help:"List scene collections." aliases:"ls" completion-enabled-command-alias:"false"`
|
||||||
Current SceneCollectionCurrentCmd `help:"Get current scene collection." cmd:"" aliases:"c"`
|
Current SceneCollectionCurrentCmd `cmd:"" help:"Get current scene collection." aliases:"c" completion-enabled-command-alias:"false"`
|
||||||
Switch SceneCollectionSwitchCmd `help:"Switch scene collection." cmd:"" aliases:"sw"`
|
Switch SceneCollectionSwitchCmd `cmd:"" help:"Switch scene collection." aliases:"sw" completion-enabled-command-alias:"false"`
|
||||||
Create SceneCollectionCreateCmd `help:"Create scene collection." cmd:"" aliases:"new"`
|
Create SceneCollectionCreateCmd `cmd:"" help:"Create scene collection." aliases:"new" completion-enabled-command-alias:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SceneCollectionListCmd provides a command to list all scene collections.
|
// SceneCollectionListCmd provides a command to list all scene collections.
|
||||||
|
|||||||
12
sceneitem.go
12
sceneitem.go
@@ -13,12 +13,12 @@ import (
|
|||||||
|
|
||||||
// SceneItemCmd provides commands to manage scene items in OBS Studio.
|
// SceneItemCmd provides commands to manage scene items in OBS Studio.
|
||||||
type SceneItemCmd struct {
|
type SceneItemCmd struct {
|
||||||
List SceneItemListCmd `cmd:"" help:"List all scene items." aliases:"ls"`
|
List SceneItemListCmd `cmd:"" help:"List all scene items." aliases:"ls" completion-enabled-command-alias:"false"`
|
||||||
Show SceneItemShowCmd `cmd:"" help:"Show scene item." aliases:"sh"`
|
Show SceneItemShowCmd `cmd:"" help:"Show scene item." aliases:"sh" completion-enabled-command-alias:"false"`
|
||||||
Hide SceneItemHideCmd `cmd:"" help:"Hide scene item." aliases:"h"`
|
Hide SceneItemHideCmd `cmd:"" help:"Hide scene item." aliases:"h" completion-enabled-command-alias:"false"`
|
||||||
Toggle SceneItemToggleCmd `cmd:"" help:"Toggle scene item." aliases:"tg"`
|
Toggle SceneItemToggleCmd `cmd:"" help:"Toggle scene item." aliases:"tg" completion-enabled-command-alias:"false"`
|
||||||
Visible SceneItemVisibleCmd `cmd:"" help:"Get scene item visibility." aliases:"v"`
|
Visible SceneItemVisibleCmd `cmd:"" help:"Get scene item visibility." aliases:"v" completion-enabled-command-alias:"false"`
|
||||||
Transform SceneItemTransformCmd `cmd:"" help:"Transform scene item." aliases:"t"`
|
Transform SceneItemTransformCmd `cmd:"" help:"Transform scene item." aliases:"t" completion-enabled-command-alias:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SceneItemListCmd provides a command to list all scene items in a scene.
|
// SceneItemListCmd provides a command to list all scene items in a scene.
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ import (
|
|||||||
|
|
||||||
// SettingsCmd handles settings management.
|
// SettingsCmd handles settings management.
|
||||||
type SettingsCmd struct {
|
type SettingsCmd struct {
|
||||||
Show SettingsShowCmd `help:"Show settings." cmd:"" aliases:"s"`
|
Show SettingsShowCmd `cmd:"" help:"Show settings." aliases:"s" completion-enabled-command-alias:"false"`
|
||||||
Profile SettingsProfileCmd `help:"Get/Set profile parameter setting." cmd:"" aliases:"p"`
|
Profile SettingsProfileCmd `cmd:"" help:"Get/Set profile parameter setting." aliases:"p" completion-enabled-command-alias:"false"`
|
||||||
StreamService SettingsStreamServiceCmd `help:"Get/Set stream service setting." cmd:"" aliases:"ss"`
|
StreamService SettingsStreamServiceCmd `cmd:"" help:"Get/Set stream service setting." aliases:"ss" completion-enabled-command-alias:"false"`
|
||||||
Video SettingsVideoCmd `help:"Get/Set video setting." cmd:"" aliases:"v"`
|
Video SettingsVideoCmd `cmd:"" help:"Get/Set video setting." aliases:"v" completion-enabled-command-alias:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SettingsShowCmd shows the video settings.
|
// SettingsShowCmd shows the video settings.
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ import (
|
|||||||
|
|
||||||
// StreamCmd handles the streaming commands.
|
// StreamCmd handles the streaming commands.
|
||||||
type StreamCmd struct {
|
type StreamCmd struct {
|
||||||
Start StreamStartCmd `cmd:"" help:"Start streaming." aliases:"s"`
|
Start StreamStartCmd `cmd:"" help:"Start streaming." aliases:"s" completion-enabled-command-alias:"false"`
|
||||||
Stop StreamStopCmd `cmd:"" help:"Stop streaming." aliases:"st"`
|
Stop StreamStopCmd `cmd:"" help:"Stop streaming." aliases:"st" completion-enabled-command-alias:"false"`
|
||||||
Toggle StreamToggleCmd `cmd:"" help:"Toggle streaming." aliases:"tg"`
|
Toggle StreamToggleCmd `cmd:"" help:"Toggle streaming." aliases:"tg" completion-enabled-command-alias:"false"`
|
||||||
Status StreamStatusCmd `cmd:"" help:"Get streaming status." aliases:"ss"`
|
Status StreamStatusCmd `cmd:"" help:"Get streaming status." aliases:"ss" completion-enabled-command-alias:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// StreamStartCmd starts the stream.
|
// StreamStartCmd starts the stream.
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
|
|
||||||
// StudioModeCmd provides commands to manage studio mode in OBS Studio.
|
// StudioModeCmd provides commands to manage studio mode in OBS Studio.
|
||||||
type StudioModeCmd struct {
|
type StudioModeCmd struct {
|
||||||
Enable StudioModeEnableCmd `cmd:"enable" help:"Enable studio mode." aliases:"on"`
|
Enable StudioModeEnableCmd `cmd:"enable" help:"Enable studio mode." aliases:"on" completion-enabled-command-alias:"false"`
|
||||||
Disable StudioModeDisableCmd `cmd:"disable" help:"Disable studio mode." aliases:"off"`
|
Disable StudioModeDisableCmd `cmd:"disable" help:"Disable studio mode." aliases:"off" completion-enabled-command-alias:"false"`
|
||||||
Toggle StudioModeToggleCmd `cmd:"toggle" help:"Toggle studio mode." aliases:"tg"`
|
Toggle StudioModeToggleCmd `cmd:"toggle" help:"Toggle studio mode." aliases:"tg" completion-enabled-command-alias:"false"`
|
||||||
Status StudioModeStatusCmd `cmd:"status" help:"Get studio mode status." aliases:"ss"`
|
Status StudioModeStatusCmd `cmd:"status" help:"Get studio mode status." aliases:"ss" completion-enabled-command-alias:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// StudioModeEnableCmd provides a command to enable studio mode.
|
// StudioModeEnableCmd provides a command to enable studio mode.
|
||||||
|
|||||||
Reference in New Issue
Block a user