File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ obs-powershell-commands
2+ -----------------------
3+
4+ obs-powershell exports `|{($importedModule = Import-Module ..\ -Global -PassThru).ExportedCommands.Count}|` commands
5+ (`|{$importedModule.ExportedFunctions.Count}|` functions and `|{$importedModule.ExportedAliases.Count}|` aliases)
6+
7+ A good number of these commands directly correspond to an obs-websocket message.
8+ For a complete list, see [obs-powershell-websocket-commands](docs/obs-powershell-websocket-commands.md).
9+
10+
11+ Functions
12+ =========
13+
14+ ~~~PipeScript{
15+ [PSCustomObject]@{
16+ Table =
17+ $importedModule.ExportedFunctions.Values |
18+ Sort-Object Name |
19+ .Name {
20+ "[$($_.Name)]($("docs/$($_.Name).md"))"
21+ } .Synopsis
22+ }
23+ }
24+ ~~~
25+
26+
27+ Aliases
28+ =======
29+ ~~~PipeScript{
30+ [PSCustomObject]@{
31+ Table =
32+ $importedModule.ExportedFunctions.Values |
33+ Sort-Object Name |
34+ .Name {
35+ "[$($_.Name)]($("docs/$($_.Name).md"))"
36+ } .ResolvedCommand
37+ }
38+ }
39+ ~~~
Original file line number Diff line number Diff line change 1+ obs-powershell-websocket-commands
2+ ---------------------------------
3+
4+ `|{($importedModule = Import-Module ..\ -Global -PassThru)}|`
5+
6+ Many of the commands communicate directly with [obs-websocket](https://github.com/obsproject/obs-websocket)
7+ and are are generated by [PipeScript](https://github.com/StartAutomating/PipeScript).
8+
9+ ~~~PipeScript {
10+ $exportedCmds = $importedModule.ExportedCommands.Values |
11+ Where-Object {
12+ $_.ScriptBlock.Attributes.Key -eq 'OBS.WebSocket.RequestType'
13+ }
14+ [PSCustomObject]@{
15+ Table = $exportedCmds |
16+ .Name {
17+ "[$($_.Name)]($("docs/$($_.Name).md"))"
18+ } .RequestType {
19+ $cmd = $_
20+ foreach ($attr in $cmd.ScriptBlock.Attributes) {
21+ if ($attr.Key -eq 'OBS.WebSocket.RequestType') {
22+ "[$($attr.Value)](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#$($attr.Value.ToLower()))"
23+ }
24+ }
25+ }
26+ }
27+ }
28+ ~~~
29+
You can’t perform that action at this time.
0 commit comments