Recommended Posts

Would be great to just export the parts needed to create a build (bricks remaining after pushing build this moc) into a brickowl wishlist.

 

And after receiving your orders be able to import the brickowl order into my parts, like what is now possible from bricklink.

With a api command it is pretty easy to export the order data. so maybe you should build something to add your brickowl API key into your profile.

 

 

 

Share this post


Link to post
Share on other sites
I've written a script for BrickOwl order -> Rebrickable part list file for importing into Rebrickable. Here it is on Github:

 


 

There are lots of features I'd like to add, like:

-Fetching list of all BrickOwl order id numbers automatically

-Option to create one big CSV file instead of one for each file

-Caching the color convesion data I grab from here: http://rebrickable.com/colors

 

Let me know if this is useful for you as well and if there are any features you'd like to see added. I can't promise you that I can add it, but if not, you're welcome to submit a pull request on github.

Share this post


Link to post
Share on other sites

 

I've written a script for BrickOwl order -> Rebrickable part list file for importing into Rebrickable. Here it is on Github:
 
 
There are lots of features I'd like to add, like:
-Fetching list of all BrickOwl order id numbers automatically
-Option to create one big CSV file instead of one for each file
-Caching the color convesion data I grab from here: http://rebrickable.com/colors
 
Let me know if this is useful for you as well and if there are any features you'd like to see added. I can't promise you that I can add it, but if not, you're welcome to submit a pull request on github.

 

 

Nice! I'll probably incorporate that, but (unfortunately) I'm using PHP so will rewrite it. I will also have to translate the BO part numbers, don't think I've exposed that data anywhere in my external APIs yet.

Share this post


Link to post
Share on other sites

Thanks!

 

What do you mean you have to translate BO part numbers?

 

My script just uses the "design_id" that BO provides, but I'm thinking maybe I should use the ldraw_id or peeron_id. Using design_id worked fine for most parts, but a few parts it imported into rebrickable but not as the part I would want it to import as. For example, this part in BrickOwl: http://www.brickowl.com/catalog/lego-plate-1-x-1-with-clip-thick-ring-4081 has design_id 4081. This exists in Rebrickable, but it's not in many sets: http://rebrickable.com/search?q=4081&exclude=0&official=1&custom=1, the one we want is 4081b. In BrickOwl, 4081b is the ldraw_id and peeron_id. So maybe I should make my script use the ldraw_id or peeron_id instead from BO instead?

 

Dave

Share this post


Link to post
Share on other sites

I just confirmed with a few more parts that didn't import to the right part and it looks like I need to use either ldraw_id or peeron_id instead


This part: http://rebrickable.com/search?q=15207&exclude=0&official=1&custom=1

 

I was taking the design_id from BO which is 15207 (in 0 sets) but I actually want 30413 (in 337 sets). The whole point of importing to Rebrickable is so that I can find other sets to build with my parts, and I was noticing that Rebrickable was saying I didn't have any of this part, which didn't make sense. I'll commit a change now.

Share this post


Link to post
Share on other sites

Crap, then there are some cases where we want the design_id instead of the ldraw id. For example: part #3794. Here we want 3794 (tons of sets), not 3794b (very few sets). http://rebrickable.com/search?q=3794&theme=0&numpieces=0&maxpieces=1050&year=1975&yearto=2014&official=1&custom=1&pt=0&c=-1&sets=&showunused=1

 

I think I'm going to have to query the ldraw and design_id in rebrickable to find out which one is in more sets, using their API. Wow, I didn't realize Rebrickable had an awesome API as well. Cool, this should be a breeze.

Share this post


Link to post
Share on other sites

Welcome to my headache :) It's an ongoing process to de-dup a lot of part numbers, but in general we've tried to use ldraw over others.

Share this post


Link to post
Share on other sites

I've made some update to the brickowl2rebrickable script:

 

  • It now looks at the design_id, ldraw_id, and peeron_id from BrickOwl and then looks for parts in Rebrickable that match. Chooses whichever one has more parts in Rebrickable.
  • New script called combine_rebrickable_csv.py that combines multiple Rebrickable.csv files into one.

So far it's working well for me. I've imported 4 BrickOwl orders into Rebrickable as well as a list of loose parts obtained separately from BrickOwl and I am using it to find MOCs and sets to build on Rebrickable based on these parts.

Share this post


Link to post
Share on other sites

Good to hear. I did make a start on adding a BrickOwl import, but then got side tracked on other higher priority things instead :) Maybe next month...

Share this post


Link to post
Share on other sites

I've finished the BrickOwl orders import now. I need to tweak it a bit when it fails to recognise parts/colors but the functionality is there for all pages that allow parts importing.

Share this post


Link to post
Share on other sites

Hi,

 

Am an AFOL and new to all of this stuff I'm afraid but this topic seems to cover the same question I had myself when looking at ordering parts from a Brickowl reseller for a large MOC.

 

Because the order is only 72% of the required items, I wondered how I could easily include the 72% of parts I'm going to order into a parts list here once I have them.

 

So I was wondering if the ability to order a Brickowl order had progressed any further?

 

Thanks for a great website!

 

Cheers, Ross.

Share this post


Link to post
Share on other sites