#!/usr/bin/env python3

import argparse, os, shutil
from tqdm import tqdm

parser = argparse.ArgumentParser()
parser.add_argument("--path", type=str, required=True)
parser.add_argument("--width", type=int, default=-1)
parser.add_argument("--height", type=int, default=-1)
args = parser.parse_args()
assert (args.width > 0) == (args.height > 0)

import georeg

# files = [
#     "can_bus",
#     "maps",
#     "samples",
#     "sweeps",
#     "v1.0-trainval",
# ]
#
# missing_files = [file for file in files if not os.path.exists(os.path.join(args.path, file))]
# if len(missing_files) > 0:
#     print("Please download the nuscenes dataset and place into the folder specified by --path. Missing files: " + ", ".join(missing_files))
#     sys.exit(-1)
# TODO: implement

if args.height > 0:
    georeg.data.prepare.resize(args.path, (args.height, args.width))
