fix table alignments

patch bump
This commit is contained in:
2025-05-25 10:27:10 +01:00
parent a82344b79e
commit 133ce8e711
8 changed files with 340 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025-present onyx-and-iris <code@onyxandiris.online>
#
# SPDX-License-Identifier: MIT
__version__ = "0.12.6"
__version__ = "0.12.7"

View File

@@ -29,13 +29,17 @@ def list(ctx: typer.Context, source_name: str):
table = Table(title=f'Filters for Source: {source_name}')
for column in ('Name', 'Kind', 'Enabled', 'Settings'):
table.add_column(column, justify='center', style='cyan')
table.add_column(
column,
justify='left' if column in ('Name', 'Kind') else 'center',
style='cyan',
)
for filter in resp.filters:
table.add_row(
filter['filterName'],
util.snakecase_to_titlecase(filter['filterKind']),
':heavy_check_mark:' if filter['filterEnabled'] else ':x:',
':white_heavy_check_mark:' if filter['filterEnabled'] else ':x:',
'\n'.join(
[
f'{util.snakecase_to_titlecase(k):<20} {v:>10}'

View File

@@ -55,7 +55,7 @@ def list(
table.add_row(
str(item_id),
group_name,
':heavy_check_mark:' if is_enabled else ':x:',
':white_heavy_check_mark:' if is_enabled else ':x:',
)
out_console.print(table)

View File

@@ -31,7 +31,7 @@ def list(ctx: typer.Context):
for profile in resp.profiles:
table.add_row(
profile,
':heavy_check_mark:' if profile == resp.current_profile_name else '',
':white_heavy_check_mark:' if profile == resp.current_profile_name else '',
)
out_console.print(table)

View File

@@ -24,16 +24,18 @@ def list(ctx: typer.Context):
"""List all scenes."""
resp = ctx.obj.get_scene_list()
scenes = (
(scene.get('sceneIndex'), scene.get('sceneName'))
(scene.get('sceneName'), scene.get('sceneUuid'))
for scene in reversed(resp.scenes)
)
table = Table(title='Scenes')
table.add_column('Scene Name', justify='left', style='cyan')
for column in ('Name', 'UUID'):
table.add_column(column, justify='left', style='cyan')
for scene_index, scene_name in scenes:
for scene_name, scene_uuid in scenes:
table.add_row(
scene_name,
scene_uuid,
)
out_console.print(table)

View File

@@ -23,7 +23,7 @@ def list(ctx: typer.Context):
resp = ctx.obj.get_scene_collection_list()
table = Table(title='Scene Collections')
table.add_column('Scene Collection Name', justify='left', style='cyan')
table.add_column('Name', justify='left', style='cyan')
for scene_collection_name in resp.scene_collections:
table.add_row(scene_collection_name)

View File

@@ -43,7 +43,7 @@ def list(
raise typer.Exit(1)
table = Table(title=f'Items in Scene: {scene_name}')
table.add_column('Item Name', justify='left', style='cyan')
table.add_column('Name', justify='left', style='cyan')
for item in items:
table.add_row(item)