upd table padding + column heading

patch bump
This commit is contained in:
onyx-and-iris 2025-05-25 14:42:55 +01:00
parent 69fccbfe99
commit 86dc542937
9 changed files with 23 additions and 21 deletions

View File

@ -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.12.7" __version__ = "0.12.8"

View File

@ -26,12 +26,12 @@ def list(ctx: typer.Context, source_name: str):
out_console.print(f'No filters found for source {source_name}') out_console.print(f'No filters found for source {source_name}')
return return
table = Table(title=f'Filters for Source: {source_name}') table = Table(title=f'Filters for Source: {source_name}', padding=(0, 2))
for column in ('Name', 'Kind', 'Enabled', 'Settings'): for column in ('Filter Name', 'Kind', 'Enabled', 'Settings'):
table.add_column( table.add_column(
column, column,
justify='left' if column in ('Name', 'Kind') else 'center', justify='left' if column in ('Filter Name', 'Kind') else 'center',
style='cyan', style='cyan',
) )

View File

@ -44,11 +44,11 @@ def list(
err_console.print(f"No groups found in scene '{scene_name}'.") err_console.print(f"No groups found in scene '{scene_name}'.")
raise typer.Exit(1) raise typer.Exit(1)
table = Table(title=f'Groups in Scene: {scene_name}') table = Table(title=f'Groups in Scene: {scene_name}', padding=(0, 2))
for column in ('ID', 'Name', 'Enabled'): for column in ('ID', 'Group Name', 'Enabled'):
table.add_column( table.add_column(
column, justify='left' if column == 'Name' else 'center', style='cyan' column, justify='left' if column == 'Group Name' else 'center', style='cyan'
) )
for item_id, group_name, is_enabled in groups: for item_id, group_name, is_enabled in groups:

View File

@ -23,8 +23,8 @@ def list(
"""List all hotkeys.""" """List all hotkeys."""
resp = ctx.obj.get_hotkey_list() resp = ctx.obj.get_hotkey_list()
table = Table(title='Hotkeys') table = Table(title='Hotkeys', padding=(0, 2))
table.add_column('Name', justify='left', style='cyan') table.add_column('Hotkey Name', justify='left', style='cyan')
for hotkey in resp.hotkeys: for hotkey in resp.hotkeys:
table.add_row(hotkey) table.add_row(hotkey)

View File

@ -51,10 +51,10 @@ def list(
err_console.print('No inputs found.') err_console.print('No inputs found.')
raise typer.Exit(1) raise typer.Exit(1)
table = Table(title='Inputs') table = Table(title='Inputs', padding=(0, 2))
for column in ('Name', 'Kind'): for column in ('Input Name', 'Kind'):
table.add_column( table.add_column(
column, justify='left' if column == 'Name' else 'center', style='cyan' column, justify='left' if column == 'Input Name' else 'center', style='cyan'
) )
for input_name, input_kind in inputs: for input_name, input_kind in inputs:

View File

@ -22,10 +22,12 @@ def list(ctx: typer.Context):
"""List profiles.""" """List profiles."""
resp = ctx.obj.get_profile_list() resp = ctx.obj.get_profile_list()
table = Table(title='Profiles') table = Table(title='Profiles', padding=(0, 2))
for column in ('Name', 'Current'): for column in ('Profile Name', 'Current'):
table.add_column( table.add_column(
column, justify='left' if column == 'Name' else 'center', style='cyan' column,
justify='left' if column == 'Profile Name' else 'center',
style='cyan',
) )
for profile in resp.profiles: for profile in resp.profiles:

View File

@ -28,8 +28,8 @@ def list(ctx: typer.Context):
for scene in reversed(resp.scenes) for scene in reversed(resp.scenes)
) )
table = Table(title='Scenes') table = Table(title='Scenes', padding=(0, 2))
for column in ('Name', 'UUID'): for column in ('Scene Name', 'UUID'):
table.add_column(column, justify='left', style='cyan') table.add_column(column, justify='left', style='cyan')
for scene_name, scene_uuid in scenes: for scene_name, scene_uuid in scenes:

View File

@ -22,8 +22,8 @@ def list(ctx: typer.Context):
"""List all scene collections.""" """List all scene collections."""
resp = ctx.obj.get_scene_collection_list() resp = ctx.obj.get_scene_collection_list()
table = Table(title='Scene Collections') table = Table(title='Scene Collections', padding=(0, 2))
table.add_column('Name', justify='left', style='cyan') table.add_column('Scene Collection Name', justify='left', style='cyan')
for scene_collection_name in resp.scene_collections: for scene_collection_name in resp.scene_collections:
table.add_row(scene_collection_name) table.add_row(scene_collection_name)

View File

@ -42,8 +42,8 @@ def list(
err_console.print(f"No items found in scene '{scene_name}'.") err_console.print(f"No items found in scene '{scene_name}'.")
raise typer.Exit(1) raise typer.Exit(1)
table = Table(title=f'Items in Scene: {scene_name}') table = Table(title=f'Items in Scene: {scene_name}', padding=(0, 2))
table.add_column('Name', justify='left', style='cyan') table.add_column('Item Name', justify='left', style='cyan')
for item in items: for item in items:
table.add_row(item) table.add_row(item)