aburgueno

Open Source LEGO collection management application available to all on GitHub

Recommended Posts

Hi there,

I have been working for a while on a Python 3 application to manage my LEGO collection and I have just made it available on GitHub at https://github.com/aburgueno/lego-collection

I physically store my +- 60,000 Lego bricks in labelled boxes (+- 275) according to their type. As it is the case with rebrickable.com, for each Lego set I own, the application tells me what type of Lego bricks I need to build it and how many of each type. In addition (and this is the interesting point), the application tells me in which box I store each brick.

As an example, the image below displays one of the html pages generated by the application with the box labels printed in green.

The application uses the rebrickable.com API and the Python packages shelves, pandas and jinja2. If there is some interest out there, I can work a little bit to add some documentation.

I hope this is useful.

Augusto.

Capture.JPG

Share this post


Link to post
Share on other sites

In the picture below you can see some of my boxes. Each box has a label and contains bricks of specific types. My application knows in which box each brick is and combines that information with information coming from Rebrickable to build reports such as the one shown in the opening post of this thread. So whenever I want to rebuild an old set, I not only know which blocks I need, but also where to find them. The latter is unknown to Rebrickable.

 

IMG_20181213_191950_1.jpg

Share this post


Link to post
Share on other sites
1 hour ago, aburgueno said:

In the picture below you can see some of my boxes. Each box has a label and contains bricks of specific types. My application knows in which box each brick is and combines that information with information coming from Rebrickable to build reports such as the one shown in the opening post of this thread. So whenever I want to rebuild an old set, I not only know which blocks I need, but also where to find them. The latter is unknown to Rebrickable.

FYI, You can add location notes as a pro user. 

Share this post


Link to post
Share on other sites

Yes, I know. I have considered upgrading to pro and using that feature. However, at the end I decided to go for my own application to avoid having to manually enter those data in Rebrickable. My programe uses a simple two column csv file (part_num, box_num) which is easy to maintain.

Share this post


Link to post
Share on other sites

I like the idea. I went with labelling all my boxes with images of the parts, so I can recognize them. Downside is that I don't have a specific order in the boxes (food storage trays, stacked 8 high, 2 rows deep), what makes searching for them time-consuming. If I would number them like you did, that would solve the problem.

Share this post


Link to post
Share on other sites

Thank you. If you number them, though, you would need a sort of index linking blocks and box numbers. That's what my application provides. 

Share this post


Link to post
Share on other sites
2 hours ago, aburgueno said:

Thank you. If you number them, though, you would need a sort of index linking blocks and box numbers. That's what my application provides. 

Precisely. So your project is great!

Share this post


Link to post
Share on other sites

I would have to use three dimensions for my setup, but that isn't my major pain when it comes to the collection it's keeping any inventory location up to date since I have to move the boxes around as the content grows and need to change container. or when new types of parts are added. I try to keep categories together which cause even more moving around...

if I had a software which could help me adjusting and manage that growth.

Share this post


Link to post
Share on other sites
17 hours ago, biodreamer said:

I would have to use three dimensions for my setup, but that isn't my major pain when it comes to the collection it's keeping any inventory location up to date since I have to move the boxes around as the content grows and need to change container. or when new types of parts are added. I try to keep categories together which cause even more moving around...

if I had a software which could help me adjusting and manage that growth.

I understand. Before I wrote my application I had the same problem. Now I just have to change a line in a csv line.

If I find some time I'll try to build a Windows installer for you to try the application with your collection. 

Share this post


Link to post
Share on other sites

unless you have a lot of empty slots in your physical storage that won't do me anything good.

I basically have a wall with 6x8 racco/cocraft storage containers which mean its 6 columns with 24 rows of drawers and each drawer can hold a grid of 8x4 containers, containers are ether 1,2,4,8 slots big so it's between 24 and 4 containers inside each drawer. When a part has outgrown or don't fit into one of these container it goes into a more standard plastic boxes which I store in a bookshelf. Here I also have five different sizes until it it's out grown the bookshelf and it goes to the big container area which simply means the boxes are big enough to stacked alone. Right now that is only train tracks, Boats, base plates and other very large parts.

I know this is problem only because my collection is quite big.

Share this post


Link to post
Share on other sites

This is exactly what I was looking for. And self-hosted but still using a central parts database makes it even better. Great! Thanks to TobyMac for pointing me here. https://rebrickable.com/forum/index.php?/topic/2981-personal-lego-inventory/&page=0#comment-23987

To answer Biodreamer's first question: You can only add notes to list items in Rebrickable, not to parts. I.e. if you search for a part and click up the details, there are no notes. The only way to find the location is to manually browse the part list until your eyes catch the specific part. If it was possible to add notes to a list item, it would fill my needs. Gott nytt år för övrigt!

@Aburgueno: How is the python app run / installed? Is it acting like a web server, or is it a command line app that will output an html file if I feed it with a CSV? Is there a way to keep Rebrickable as my master repository of parts, and just add the location? Or should I stop asking questions and go read the code? ;)

Regards

/P

 

Edited by Pal

Share this post


Link to post
Share on other sites

Hi Pal!

the application runs on your local Python installation. It fetches from Rebrickable all the data concerning the sets you own only once. Those data are stored in a local OO database (Python shelves). A local CSV file (that you manually edit) stores the location of each part. Finally, the application generate static html pages that you can store locally and browse offline.

Please let me know how can I help to get it running on your side.

Best regards,

Augusto.

Share this post


Link to post
Share on other sites
On 12/16/2018 at 2:01 AM, biodreamer said:

 

I basically have a wall with 6x8 racco/cocraft storage containers[...]

What you need is RFID tags, one set for containers, one set for shelf spots and a scanner. Plenty of open source applications to handle the data. I'm envious.

Share this post


Link to post
Share on other sites
13 hours ago, raystafarian said:

What you need is RFID tags, one set for containers, one set for shelf spots and a scanner. Plenty of open source applications to handle the data. I'm envious.

Never found one that can handle dynamic growth or help with the rearrangement. There is plenty that handle static storage, in that case a simple excel sheet do the trick. I could write one myself but I don't think I will ever get that kind of free time until I retire. which is decades away.

Share this post


Link to post
Share on other sites
6 hours ago, biodreamer said:

Never found one that can handle dynamic growth or help with the rearrangement. There is plenty that handle static storage, in that case a simple excel sheet do the trick. I could write one myself but I don't think I will ever get that kind of free time until I retire. which is decades away.

Huh, you might want to give it a shot at https://softwarerecs.stackexchange.com/ then, seems a database should be able to handle data coming in like that e.g.

Box 13 Scanned
Shelf 2 Scanned
Box 13 is currently at Shelf 2
Box 13 Removed
Shelf 2 Empty
Box 13 Scanned
Shelf 4 Scanned
Box 13 is currently Removed
Shelf 4 Empty
Box 13 placed in Shelf 4

With some error handling on the front end that would be a pretty simple back end.

Share this post


Link to post
Share on other sites

Which still doesn't cover the part I want help with.the planning and execution of  the dynamic growth

I don't want my collection fragmented more than necessary so I have columns dedicated to categories, trying to keep the same color within the drawer boundaries as possible.

so for example right now, I have enough black bricks to take up 53 cells ie one drawer is full (32)l + 21 cells in the next. The remaining 11 cells are occupied with other less common colors. 

I also got 9 new cells worth of drawer of black bricks to add here: So when I execute that move I end up with 32 + 30 cells occupied by black but I also need to find the best spot for those 11 cells that get evicted in that move and find a good candidate for the remaining 2 cells. Since I don't want more fragmentation than necessary.

this means that each operation will affect minimum two drawers and can ripple affect over much more. and I have very little room for empty cells so that is kept to a minimum.

And every time I get more parts, I will end up getting multiple growth and or shrink operation like this which is causing a pain to keep labels and inventory position up to date.

 

And I don't know of any software that does this kind of operations on physical storage. (only harddrives)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now