parameterize detect floorplan step to work with custom data paths

This commit is contained in:
Viktor Barzin 2025-05-14 21:05:59 +00:00
parent 07fef7fbab
commit e3abf4b373
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
2 changed files with 11 additions and 6 deletions

View file

@ -75,9 +75,12 @@ def dump_images(ctx: click.core.Context):
@cli.command()
def detect_floorplan():
click.echo('Running detect_floorplan')
detect_floorplan_module.detect_floorplan()
@click.pass_context
def detect_floorplan(ctx: click.core.Context):
data_dir = ctx.obj['data_dir']
click.echo(f'Running detect_floorplan in {data_dir}')
listing_paths = sorted(list(pathlib.Path(data_dir).glob("*/listing.json")))
detect_floorplan_module.detect_floorplan(listing_paths)
@cli.command()