mirror of
https://github.com/onyx-and-iris/simple-recorder.git
synced 2026-04-21 00:33:36 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8813c25819 | |||
| 6035e09e43 | |||
| 0fe22debb6 | |||
| d8d7fce5cc | |||
| ca7604c279 |
64
README.md
64
README.md
@@ -49,6 +49,38 @@ OBS_THEME=Reds
|
|||||||
|
|
||||||
## Use
|
## Use
|
||||||
|
|
||||||
|
### CLI
|
||||||
|
|
||||||
|
To launch the CLI pass any subcommand, for example:
|
||||||
|
|
||||||
|
```console
|
||||||
|
simple-recorder start "File Name"
|
||||||
|
|
||||||
|
simple-recorder stop
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Commands:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
Usage: simple-recorder [OPTIONS] COMMAND
|
||||||
|
|
||||||
|
┏━ Subcommands ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||||
|
┃ start Start recording ┃
|
||||||
|
┃ stop Stop recording ┃
|
||||||
|
┃ pause Pause recording ┃
|
||||||
|
┃ resume Resume recording ┃
|
||||||
|
┃ directory Get or set the recording directory ┃
|
||||||
|
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||||
|
|
||||||
|
┏━ Options ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||||
|
┃ --host <HOST> OBS WebSocket host ┃
|
||||||
|
┃ --port <PORT> OBS WebSocket port ┃
|
||||||
|
┃ --password <PASSWORD> OBS WebSocket password ┃
|
||||||
|
┃ --theme <THEME> GUI theme (Light Purple, Neutral Blue, Reds, Sandy Beach, ┃
|
||||||
|
┃ Kayak, Light Blue 2) ┃
|
||||||
|
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||||
|
```
|
||||||
|
|
||||||
### GUI
|
### GUI
|
||||||
|
|
||||||
To launch the GUI run the root command without any subcommands:
|
To launch the GUI run the root command without any subcommands:
|
||||||
@@ -69,36 +101,4 @@ You can change the colour theme with the --theme option:
|
|||||||
simple-recorder --theme="Light Purple"
|
simple-recorder --theme="Light Purple"
|
||||||
```
|
```
|
||||||
|
|
||||||
### CLI
|
|
||||||
|
|
||||||
```shell
|
|
||||||
Usage: simple-recorder [OPTIONS] COMMAND
|
|
||||||
|
|
||||||
┏━ Subcommands ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
||||||
┃ start Start recording ┃
|
|
||||||
┃ stop Stop recording ┃
|
|
||||||
┃ pause Pause recording ┃
|
|
||||||
┃ resume Resume recording ┃
|
|
||||||
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
||||||
|
|
||||||
┏━ Options ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
||||||
┃ --host <HOST> OBS WebSocket host ┃
|
|
||||||
┃ --port <PORT> OBS WebSocket port ┃
|
|
||||||
┃ --password <PASSWORD> OBS WebSocket password ┃
|
|
||||||
┃ --theme <THEME> GUI theme (Light Purple, Neutral Blue, Reds, Sandy Beach, ┃
|
|
||||||
┃ Kayak, Light Blue 2) ┃
|
|
||||||
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
||||||
```
|
|
||||||
|
|
||||||
To launch the CLI pass any subcommand (start/stop etc...), for example:
|
|
||||||
|
|
||||||
```console
|
|
||||||
simple-recorder start "File Name"
|
|
||||||
|
|
||||||
simple-recorder stop
|
|
||||||
```
|
|
||||||
|
|
||||||
- If no filename is passed to start then you will be prompted for one.
|
|
||||||
- A default_name will be used if none is supplied to the prompt.
|
|
||||||
|
|
||||||
[obs-studio]: https://obsproject.com/
|
[obs-studio]: https://obsproject.com/
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 78 KiB |
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "simple-recorder"
|
name = "simple-recorder"
|
||||||
version = "0.3.0"
|
version = "0.3.2"
|
||||||
description = "A simple OBS recorder"
|
description = "A simple OBS recorder"
|
||||||
authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }]
|
authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class Directory(Command):
|
|||||||
async def run(self):
|
async def run(self):
|
||||||
try:
|
try:
|
||||||
with obsws.ReqClient(
|
with obsws.ReqClient(
|
||||||
host=self.host, port=self.port, password=self.password
|
host=self.host, port=self.port, password=self.password, timeout=3
|
||||||
) as client:
|
) as client:
|
||||||
if self.directory:
|
if self.directory:
|
||||||
client.set_record_directory(self.directory)
|
client.set_record_directory(self.directory)
|
||||||
@@ -32,5 +32,5 @@ class Directory(Command):
|
|||||||
f"Current recording directory: {highlight(resp.record_directory)}"
|
f"Current recording directory: {highlight(resp.record_directory)}"
|
||||||
)
|
)
|
||||||
return resp.record_directory
|
return resp.record_directory
|
||||||
except Exception as e:
|
except TimeoutError:
|
||||||
raise SimpleRecorderError(f"Failed to get recording directory: {e}")
|
raise SimpleRecorderError("Failed to connect to OBS. Is it running?")
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ class SimpleRecorderWindow(fsg.Window):
|
|||||||
current_directory = resp.record_directory
|
current_directory = resp.record_directory
|
||||||
except (ConnectionRefusedError, TimeoutError):
|
except (ConnectionRefusedError, TimeoutError):
|
||||||
status_message = "Failed to connect to OBS. Is it running?"
|
status_message = "Failed to connect to OBS. Is it running?"
|
||||||
|
current_directory = ""
|
||||||
|
|
||||||
recorder_layout = [
|
recorder_layout = [
|
||||||
[fsg.Text("Enter recording filename:", key="-PROMPT-")],
|
[fsg.Text("Enter recording filename:", key="-PROMPT-")],
|
||||||
|
|||||||
Reference in New Issue
Block a user