mirror of
https://github.com/onyx-and-iris/obsws-python.git
synced 2024-11-22 12:50:53 +00:00
add readmes to examples.
This commit is contained in:
parent
7c6ebd1dae
commit
66a06617c6
16
examples/events/README.md
Normal file
16
examples/events/README.md
Normal file
@ -0,0 +1,16 @@
|
||||
## About
|
||||
|
||||
Registers a list of callback functions to hook into OBS events.
|
||||
|
||||
## Use
|
||||
|
||||
Simply run the code and trigger the events, press `<Enter>` to exit.
|
||||
|
||||
This example assumes the existence of a `config.toml`, placed next to `__main__.py`:
|
||||
|
||||
```toml
|
||||
[connection]
|
||||
host = "localhost"
|
||||
port = 4455
|
||||
password = "mystrongpass"
|
||||
```
|
20
examples/hotkeys/README.md
Normal file
20
examples/hotkeys/README.md
Normal file
@ -0,0 +1,20 @@
|
||||
## About
|
||||
|
||||
Sets up some hotkeys to trigger certain actions. Registers a callback function to notify of scene switch event.
|
||||
|
||||
Requires [Python Keyboard library](https://github.com/boppreh/keyboard).
|
||||
|
||||
## Use
|
||||
|
||||
Simply run the code and press the assigned hotkeys. Press `ctrl+enter` to exit.
|
||||
|
||||
This example assumes the existence of a `config.toml`, placed next to `__main__.py`:
|
||||
|
||||
```toml
|
||||
[connection]
|
||||
host = "localhost"
|
||||
port = 4455
|
||||
password = "mystrongpass"
|
||||
```
|
||||
|
||||
It also assumes the existence of scenes named `START`, `BRB` and `END`.
|
14
examples/scene_rotate/README.md
Normal file
14
examples/scene_rotate/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
## About
|
||||
|
||||
Collects the names of all available scenes, rotates through them and prints their name.
|
||||
|
||||
## Use
|
||||
|
||||
This example assumes the existence of a `config.toml`, placed next to `__main__.py`:
|
||||
|
||||
```toml
|
||||
[connection]
|
||||
host = "localhost"
|
||||
port = 4455
|
||||
password = "mystrongpass"
|
||||
```
|
@ -7,9 +7,9 @@ def main():
|
||||
resp = cl.get_scene_list()
|
||||
scenes = reversed(tuple(di.get("sceneName") for di in resp.scenes))
|
||||
|
||||
for sc in scenes:
|
||||
print(f"Switching to scene {sc}")
|
||||
cl.set_current_program_scene(sc)
|
||||
for scene in scenes:
|
||||
print(f"Switching to scene {scene}")
|
||||
cl.set_current_program_scene(scene)
|
||||
time.sleep(0.5)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user