upd shorthand aliases

This commit is contained in:
onyx-and-iris 2025-04-26 16:17:28 +01:00
parent 467c14f570
commit e806c6345d
9 changed files with 33 additions and 33 deletions

View File

@ -44,7 +44,7 @@ def _get_group(group_name: str, resp: DataclassProtocol) -> dict | None:
return group
@app.command()
@app.command('show | sh')
def show(ctx: typer.Context, scene_name: str, group_name: str):
"""Show a group in a scene."""
if not validate.scene_in_scenes(ctx, scene_name):
@ -71,7 +71,7 @@ def show(ctx: typer.Context, scene_name: str, group_name: str):
typer.echo(f"Group '{group_name}' is now visible.")
@app.command()
@app.command('hide | h')
def hide(ctx: typer.Context, scene_name: str, group_name: str):
"""Hide a group in a scene."""
if not validate.scene_in_scenes(ctx, scene_name):
@ -129,7 +129,7 @@ def toggle(ctx: typer.Context, scene_name: str, group_name: str):
typer.echo(f"Group '{group_name}' is now hidden.")
@app.command()
@app.command('status | ss')
def status(ctx: typer.Context, scene_name: str, group_name: str):
"""Get the status of a group in a scene."""
if not validate.scene_in_scenes(ctx, scene_name):

View File

@ -42,7 +42,7 @@ def list(
typer.echo('\n'.join(input_.get('inputName') for input_ in inputs))
@app.command()
@app.command('mute | m')
def mute(ctx: typer.Context, input_name: str):
"""Mute an input."""
if not validate.input_in_inputs(ctx, input_name):
@ -60,7 +60,7 @@ def mute(ctx: typer.Context, input_name: str):
typer.echo(f"Input '{input_name}' muted.")
@app.command()
@app.command('unmute | um')
def unmute(ctx: typer.Context, input_name: str):
"""Unmute an input."""
if not validate.input_in_inputs(ctx, input_name):

View File

@ -21,14 +21,14 @@ def list(ctx: typer.Context):
typer.echo(profile)
@app.command()
@app.command('current | get')
def current(ctx: typer.Context):
"""Get the current profile."""
resp = ctx.obj.get_profile_list()
typer.echo(resp.current_profile_name)
@app.command()
@app.command('switch | set')
def switch(ctx: typer.Context, profile_name: str):
"""Switch to a profile."""
if not validate.profile_exists(ctx, profile_name):
@ -50,7 +50,7 @@ def switch(ctx: typer.Context, profile_name: str):
typer.echo(f"Switched to profile '{profile_name}'.")
@app.command()
@app.command('create | new')
def create(ctx: typer.Context, profile_name: str):
"""Create a new profile."""
if validate.profile_exists(ctx, profile_name):
@ -64,7 +64,7 @@ def create(ctx: typer.Context, profile_name: str):
typer.echo(f"Created profile '{profile_name}'.")
@app.command()
@app.command('remove | rm')
def remove(ctx: typer.Context, profile_name: str):
"""Remove a profile."""
if not validate.profile_exists(ctx, profile_name):

View File

@ -18,7 +18,7 @@ def _get_recording_status(ctx: typer.Context) -> tuple:
return resp.output_active, resp.output_paused
@app.command()
@app.command('start | s')
def start(ctx: typer.Context):
"""Start recording."""
active, paused = _get_recording_status(ctx)
@ -34,7 +34,7 @@ def start(ctx: typer.Context):
typer.echo('Recording started successfully.')
@app.command()
@app.command('stop | st')
def stop(ctx: typer.Context):
"""Stop recording."""
active, _ = _get_recording_status(ctx)
@ -46,7 +46,7 @@ def stop(ctx: typer.Context):
typer.echo('Recording stopped successfully.')
@app.command()
@app.command('status | ss')
def status(ctx: typer.Context):
"""Get recording status."""
active, paused = _get_recording_status(ctx)
@ -69,7 +69,7 @@ def toggle(ctx: typer.Context):
ctx.invoke(start, ctx=ctx)
@app.command()
@app.command('resume | r')
def resume(ctx: typer.Context):
"""Resume recording."""
active, paused = _get_recording_status(ctx)
@ -84,7 +84,7 @@ def resume(ctx: typer.Context):
typer.echo('Recording resumed successfully.')
@app.command()
@app.command('pause | p')
def pause(ctx: typer.Context):
"""Pause recording."""
active, paused = _get_recording_status(ctx)

View File

@ -12,21 +12,21 @@ def main():
"""Control profiles in OBS."""
@app.command()
@app.command('start | s')
def start(ctx: typer.Context):
"""Start the replay buffer."""
ctx.obj.start_replay_buffer()
typer.echo('Replay buffer started.')
@app.command()
@app.command('stop | st')
def stop(ctx: typer.Context):
"""Stop the replay buffer."""
ctx.obj.stop_replay_buffer()
typer.echo('Replay buffer stopped.')
@app.command()
@app.command('status | ss')
def status(ctx: typer.Context):
"""Get the status of the replay buffer."""
resp = ctx.obj.get_replay_buffer_status()
@ -36,7 +36,7 @@ def status(ctx: typer.Context):
typer.echo('Replay buffer is not active.')
@app.command()
@app.command('save | sv')
def save(ctx: typer.Context):
"""Save the replay buffer."""
ctx.obj.save_replay_buffer()

View File

@ -77,7 +77,7 @@ def _get_scene_name_and_item_id(
@_validate_scene_name_and_item_name
@app.command()
@app.command('show | sh')
def show(
ctx: typer.Context,
scene_name: str,
@ -99,7 +99,7 @@ def show(
@_validate_scene_name_and_item_name
@app.command()
@app.command('hide | h')
def hide(
ctx: typer.Context,
scene_name: str,
@ -164,7 +164,7 @@ def toggle(
@_validate_scene_name_and_item_name
@app.command()
@app.command('visible | v')
def visible(
ctx: typer.Context,
scene_name: str,
@ -206,7 +206,7 @@ def visible(
@_validate_scene_name_and_item_name
@app.command()
@app.command('transform | t')
def transform(
ctx: typer.Context,
scene_name: str,

View File

@ -18,7 +18,7 @@ def _get_streaming_status(ctx: typer.Context) -> tuple:
return resp.output_active, resp.output_duration
@app.command()
@app.command('start | s')
def start(ctx: typer.Context):
"""Start streaming."""
active, _ = _get_streaming_status(ctx)
@ -30,7 +30,7 @@ def start(ctx: typer.Context):
typer.echo('Streaming started successfully.')
@app.command()
@app.command('stop | st')
def stop(ctx: typer.Context):
"""Stop streaming."""
active, _ = _get_streaming_status(ctx)
@ -42,7 +42,7 @@ def stop(ctx: typer.Context):
typer.echo('Streaming stopped successfully.')
@app.command()
@app.command('status | ss')
def status(ctx: typer.Context):
"""Get streaming status."""
active, duration = _get_streaming_status(ctx)

View File

@ -12,19 +12,19 @@ def main():
"""Control studio mode in OBS."""
@app.command()
@app.command('enable | on')
def enable(ctx: typer.Context):
"""Enable studio mode."""
ctx.obj.set_studio_mode_enabled(True)
@app.command()
@app.command('disable | off')
def disable(ctx: typer.Context):
"""Disable studio mode."""
ctx.obj.set_studio_mode_enabled(False)
@app.command()
@app.command('toggle | tg')
def toggle(ctx: typer.Context):
"""Toggle studio mode."""
resp = ctx.obj.get_studio_mode_enabled()
@ -36,7 +36,7 @@ def toggle(ctx: typer.Context):
typer.echo('Studio mode is now enabled.')
@app.command()
@app.command('status | ss')
def status(ctx: typer.Context):
"""Get the status of studio mode."""
resp = ctx.obj.get_studio_mode_enabled()

View File

@ -12,28 +12,28 @@ def main():
"""Control virtual camera in OBS."""
@app.command()
@app.command('start | s')
def start(ctx: typer.Context):
"""Start the virtual camera."""
ctx.obj.start_virtual_cam()
typer.echo('Virtual camera started.')
@app.command()
@app.command('stop | p')
def stop(ctx: typer.Context):
"""Stop the virtual camera."""
ctx.obj.stop_virtual_cam()
typer.echo('Virtual camera stopped.')
@app.command()
@app.command('toggle | tg')
def toggle(ctx: typer.Context):
"""Toggle the virtual camera."""
ctx.obj.toggle_virtual_cam()
typer.echo('Virtual camera toggled.')
@app.command()
@app.command('status | ss')
def status(ctx: typer.Context):
"""Get the status of the virtual camera."""
resp = ctx.obj.get_virtual_cam_status()