import argparse
import pathlib
import pcbenv

args = argparse.ArgumentParser()

args.add_argument("-t", action='store_true', help="Load tracks", default=False)
args.add_argument("board", type=str, nargs='?', help="Path to board file (json or kicad_pcb).", default="data/boards/PCBBenchmarks-master/bm1/bm1.unrouted.kicad_pcb")

args = args.parse_args()

path = str(pathlib.Path(args.board).absolute())

print("Opening board", path)

env = pcbenv.make("pcb-v2")

env.set_task({ "pdes": path, "load_tracks": args.t })
env.render("human")

input("")
