My subsequent interest venture – dare I say known as it a “vibe venture”? – might be a device to assist me break up color-assorted piles of LEGO components into their constituting units. Earlier than I get began there are some philosophical issues to make.
Replace Nov twenty eighth: Guided Video Tour of the App
First lets take a look at the issue. I purchased 2 used LEGO collections previously and loved the detective strategy of discovering out which units these components got here from. I developed a technique to first wash the components after which break up them by shade. From stickers, minifigures or distinctive components you’ll be able to make an inventory of units. I created an inventory for every such assortment on BrickEconomy, as a result of this additionally offers me a present worth of the gathering. Granted it’s for brand new and sealed units, however sometimes the used and full worth could be one thing like half of that.
The primary assortment is bought had 31 units, the second was supposed simply to be a Buddies Resort, however nonetheless contained 7 different units. Now this newest one I counted 76 units. For the final one I additionally bought an enormous stack of unique directions which made the identification course of a lot faster. Actually there are additionally just a few extra hidden units that I might solely uncover in a while.
After washing and color-splitting essentially the most time-consuming set is to get an inventory of components for every set from BrickLink and decide the constituent components in the correct quantities from the colour piles. The issue right here is that some colours have large quantities of components, specifically white, black and the grays. So that you see that you just would possibly want 4 of a sure half and you must go dig round for these.
When you can not discover all you must make an observation someplace to order the lacking half on BrickLink. Or possibly you’ll stumble accross them because the piles bought smaller. It’s a really tedious and time consuming course of.
One factor that already confirmed nice promise is the BrickScan app which you’ll be able to level at particular person components or entire mini figures and it might discover them of their database. That may then let you know which units this half occurred in. If it’s a distinctive half (like a minifigure or a stickered/printed half) you’ll discover the precise set that is presupposed to be from. With out a subscription BrickScan limits you to a few scans per day, so I sprang for the subscription as quickly as I had verified that it’s fulfilling its promise admirably.
I’ve a separate field of stickered/printed components and minifigures and I might undergo them one after the other after which all the time drop them into the zip lock luggage for the units they belong to. The problem right here although is that this: I’d should put up 76 luggage subsequent to one another – possibly sorted by LEGO set quantity – after which for each scanned half I’ve to go the the correct again for it.
And that is solely a small a part of the general drawback. What do I do with generic components which have dozens of units they could be from?
There needs to be an app for that
So I’ve been considering if I couldn’t construct an app for myself to assist me with this. So right here’s my ideas on what I would like:
I might need an iPad App, the place I can add a lot of lists of units. Then for every set I might get the record of components from BrickLink. The variety of components I’ve already within the set’s bag I might depend and retailer.
In a means that is the reverse of the needed record function out there in BrickLink. There you can also make lists of components for particular shade after which within the notes I might write for which set I would want them. Previously I might then order lacking components and as soon as I obtained the order I might go to the needed record and discover my remark to know which set’s bag I ought to drop it into. A workable however lengthy winded course of to make sure.
As an alternative I think about having the ability to say select all 2×4 plates from the white pile. Then I might enter their BrickLink ID plus shade into my app and I might get an inventory of units the place these are lacking and what number of. And since I don’t have an element scanner to place into my app – boy that may be useful – I’d have to make use of BrickScan for that.
So with the fundamental premise for this app described the subsequent query now’s how would I make it? Construct it within the open – like an exhibitionist. Or construct it in non-public for less than myself. After all I might begin in non-public and if any person else is excited by it then share it. Or might it even be on the app retailer?
It might be beautiful to seek out some buddies with comparable pursuits (LEGO, Swift, SwiftUI, AI) after which geek out with them collectively. However then once more, I could be the one one so loopy as to need to dedicate some display time to constructing such an app. And since in all probability no person will look after what I’m proposing right here anyway, I ought to possibly simply attempt to make myself blissful. What do you assume?
Getting the Elements
There are doubtlessly a number of methods how I can get the record of components for a set, right here’s the record of components of the LEGO Titanic for instance – in printing mode – from BrickLink. The issue is that BrickLink itself solely has an API for sellers. Various choice Rebrickable has an API however it’s only for hobbyists and has some fee limiting. Additionally it appears to make use of completely different IDs for components than BrickLink I see as hindrance down the highway.
This brings me to the scraping method. For AgentCorp I put collectively a technique to parse the HTML DOM of an online web page and convert it into markdown. I made just a few minor changes and now the above components record from BrickLink converts right into a markdown file which I might simply retailer right into a SwiftData DB.
The issue right here is that AgentCorp is presently not open supply as a result of there are fairly just a few issues in there that I don’t need to “give away without spending a dime” so simply. So I can not have it as dependency in an open supply venture.
I might extract the scraping code into an open supply element after which reference that as a substitute. Or simply plain copy the code into the open supply venture. However such code duplication makes me cringe. However the path of least resistance could be to first simply vibe code an MVP.
Make it exist first. Make it good later.
Name to Motion
Usually I might have written “Conclusion” right here, however we haven’t even began but. What do you assume? Or really feel about such a venture? Would it not be fascinating to witness its progress? Would you’ve gotten a use case for that as effectively?
I feel I’ll simply go forward with a public SwiftLEGO venture on GitHub and see the place this leads me.
Associated
Classes: Enjoyable
