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

@ -1,9 +1,10 @@
import pathlib
from data_access import Listing
from tqdm import tqdm
def detect_floorplan():
listings = Listing.get_all_listings()
def detect_floorplan(listing_paths: list[str]):
listings = Listing.get_all_listings(listing_paths)
for listing in tqdm(listings):
tqdm.write(str(listing.identifier))
@ -12,7 +13,8 @@ def detect_floorplan():
def main():
detect_floorplan()
listing_paths = sorted(list(pathlib.Path("data/rs").glob("*/listing.json")))
detect_floorplan(listing_paths)
if __name__ == "__main__":