This project came as a personal need to store away my Lego sets and still be able to easily built them back.
I needed a way to group pieces together by sorts and still manage the number of groups.
I found brickarchitect, and it provided the perfect hierarchy I was looking for. I also discovered clustering and the KMeans algorithm for grouping elements.
python3 -m venv .env
source .env/bin/activate
pip install -r requirements.txtsource .env/bin/activate
./run-assortedbricksThen connect to http://localhost:5000
Give a set number or choose an inventory file, the number of clusters to generate and optionnaly a seed for the clustering algorithm.
The set number input is only available is a Rebrickable API key has been configured in the config.yaml file:
rebrickable-key: "KEY"Supported file formats are:
- Rebrickable CSV
- Brickstore XML
- LDCad PBG
Special thanks to brickarchitect for the excellent data.