mirror of
https://github.com/onyx-and-iris/obsws-cli.git
synced 2025-08-07 20:21:48 +00:00
Compare commits
2 Commits
ca0f01ef79
...
704c8c1bf4
Author | SHA1 | Date | |
---|---|---|---|
704c8c1bf4 | |||
e7d9deba71 |
15
CHANGELOG.md
15
CHANGELOG.md
@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
# [0.14.0] - 2025-05-27
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- record directory command, see [directory under Record](https://github.com/onyx-and-iris/obsws-cli?tab=readme-ov-file#record)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- project open <source_name> arg now optional, if not passed the current scene will be projected
|
||||||
|
- record stop now prints the output path of the recording.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Index column alignment in projector list-monitors now centred.
|
||||||
|
|
||||||
# [0.13.0] - 2025-05-26
|
# [0.13.0] - 2025-05-26
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
13
README.md
13
README.md
@ -324,6 +324,19 @@ obsws-cli record resume
|
|||||||
obsws-cli record pause
|
obsws-cli record pause
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- directory: Get or set the recording directory.
|
||||||
|
|
||||||
|
*optional*
|
||||||
|
- args: <record_directory>
|
||||||
|
- if not passed the current record directory will be printed.
|
||||||
|
|
||||||
|
```console
|
||||||
|
obsws-cli record directory
|
||||||
|
|
||||||
|
obsws-cli record directory "/home/me/obs-vids/"
|
||||||
|
obsws-cli record directory "C:/Users/me/Videos"
|
||||||
|
```
|
||||||
|
|
||||||
#### Stream
|
#### Stream
|
||||||
|
|
||||||
- start: Start streaming.
|
- start: Start streaming.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# SPDX-FileCopyrightText: 2025-present onyx-and-iris <code@onyxandiris.online>
|
# SPDX-FileCopyrightText: 2025-present onyx-and-iris <code@onyxandiris.online>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
__version__ = "0.13.3"
|
__version__ = "0.14.0"
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
"""module for controlling OBS recording functionality."""
|
"""module for controlling OBS recording functionality."""
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Annotated, Optional
|
||||||
|
|
||||||
import typer
|
import typer
|
||||||
from rich.console import Console
|
from rich.console import Console
|
||||||
|
|
||||||
@ -45,8 +48,8 @@ def stop(ctx: typer.Context):
|
|||||||
err_console.print('Recording is not in progress, cannot stop.')
|
err_console.print('Recording is not in progress, cannot stop.')
|
||||||
raise typer.Exit(1)
|
raise typer.Exit(1)
|
||||||
|
|
||||||
ctx.obj.stop_record()
|
resp = ctx.obj.stop_record()
|
||||||
out_console.print('Recording stopped successfully.')
|
out_console.print(f'Recording stopped successfully. Saved to: {resp.output_path}')
|
||||||
|
|
||||||
|
|
||||||
@app.command('toggle | tg')
|
@app.command('toggle | tg')
|
||||||
@ -100,3 +103,27 @@ def pause(ctx: typer.Context):
|
|||||||
|
|
||||||
ctx.obj.pause_record()
|
ctx.obj.pause_record()
|
||||||
out_console.print('Recording paused successfully.')
|
out_console.print('Recording paused successfully.')
|
||||||
|
|
||||||
|
|
||||||
|
@app.command('directory | d')
|
||||||
|
def directory(
|
||||||
|
ctx: typer.Context,
|
||||||
|
record_directory: Annotated[
|
||||||
|
Optional[Path],
|
||||||
|
# Since the CLI and OBS may be running on different platforms,
|
||||||
|
# we won't validate the path here.
|
||||||
|
typer.Argument(
|
||||||
|
file_okay=False,
|
||||||
|
dir_okay=True,
|
||||||
|
help='Directory to set for recording.',
|
||||||
|
),
|
||||||
|
] = None,
|
||||||
|
):
|
||||||
|
"""Get or set the recording directory."""
|
||||||
|
if record_directory is not None:
|
||||||
|
ctx.obj.set_record_directory(str(record_directory))
|
||||||
|
out_console.print(f'Recording directory updated to: {record_directory}')
|
||||||
|
else:
|
||||||
|
out_console.print(
|
||||||
|
f'Recording directory: {ctx.obj.get_record_directory().record_directory}'
|
||||||
|
)
|
||||||
|
@ -23,7 +23,7 @@ def test_record_start_status_stop():
|
|||||||
|
|
||||||
result = runner.invoke(app, ['record', 'stop'])
|
result = runner.invoke(app, ['record', 'stop'])
|
||||||
assert result.exit_code == 0
|
assert result.exit_code == 0
|
||||||
assert 'Recording stopped successfully.' in result.stdout
|
assert 'Recording stopped successfully. Saved to:' in result.stdout
|
||||||
|
|
||||||
time.sleep(0.5) # Wait for the recording to stop
|
time.sleep(0.5) # Wait for the recording to stop
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user