Tutorial 2 of 10 · all tutorials
Import the LEGO catalog
On this page
The goal
By the end, looking up a LEGO set by number or name will find it, and missing pieces will come with pictures.
The catalog is data from Rebrickable. Brick Bin never fetches it on a schedule. It arrives when an admin asks for it, and at no other time.
What you need
- 1 ×An admin account, from the first-run tutorial
- 1 ×A computer with a browser. Copying a page's source is easier there than on a phone.
- 6 GBFree disk for part images, plus room for the data archive
- 48 hSince the last successful import, if there was one
Steps
Open the catalog page
Sign in as an admin and open Settings, then Catalog. On a new install the page says Never imported, warns that the first import downloads about 6 GB, shows how much disk is free, and has an empty paste box.
T02-01Catalog settings, before the first importdesktop · 16:10 · lightT02-01 · Catalog settings, before the first import- Screen
- Settings, Catalog.
- State
- Fresh install. "Never imported", the 6 GB warning with free disk space, an empty paste box and a disabled "Check the page" button.
- Viewport and theme
- Desktop, 1440 wide, light.
- Focus
- The "Never imported" heading and the paste box. Crop to the main column.
Open Rebrickable's downloads page
In a new tab, go to rebrickable.com/downloads. You don't need to sign in or click anything there.
Copy the page's source
View the page source, select everything and copy it.
- Windows and Linux: Ctrl + U, then Ctrl + A and Ctrl + C
- Mac, in Chrome or Safari: ⌥ + ⌘ + U, then ⌘ + A and ⌘ + C
Why the copy and paste?
Until Rebrickable confirms that automated page reads are fine, Brick Bin won't read that page for you. For now, you are the fetch. If that answer ever comes,
REBRICKABLE_PAGE_FETCHswitches it on and the Catalog page gets a single Import catalog button.Paste it and check it
Back on the Catalog page, paste into the box and press Check the page. Brick Bin reads what you pasted and says what it will download: the catalog archive, the schema diagram and the part-image files that changed since the last import. Nothing is downloaded yet.
T02-02Catalog settings, files founddesktop · 16:10 · lightT02-02 · Catalog settings, files found- Screen
- Settings, Catalog.
- State
- Page source pasted and checked. The "This will download" summary is showing, with the Import catalog button.
- Viewport and theme
- Desktop, 1440 wide, light.
- Focus
- The summary and the Import catalog button. Crop out the pasted source, which is long and dull.
Press Import catalog
The first import downloads about 6 GB of part images plus the data archive, one file at a time. How long that takes is up to your connection, so this is a good moment to go make coffee. The page shows Import running with a file count and a progress bar, and you can leave it: the import carries on without the page open.
T02-03Catalog import in progressdesktop · 16:10 · darkT02-03 · Catalog import in progress- Screen
- Settings, Catalog, during an import.
- State
- Import running, roughly 40% of the files done, part images downloading.
- Viewport and theme
- Desktop, 1440 wide, dark.
- Focus
- The "Import running" line, the progress bar and the step label. Crop tight to it.
Check that it worked
When the page says Last imported with today's date, open Add set and type a set number you know into Look up a LEGO set. If it turns up in the list, the catalog is in. The set's cover is downloaded when you save it, not while you type.
T02-04Catalog search resultsphone · 9:19.5 · lightT02-04 · Catalog search results- Screen
- Add a set, "Look up a LEGO set".
- State
- A set number typed in, three catalog matches listed.
- Viewport and theme
- Phone, 390 wide, light.
- Focus
- The search field and the first match. Full screen, no browser chrome.
Leave it alone for 48 hours
An import can run at most once every 48 hours, counted from the end of the last one that succeeded. Until then the paste box is switched off and the page says when it is Available again. Why 48 hours?
Nothing updates by itself
The catalog is only as fresh as the last time an admin pressed the button. If a brand-new set is missing from the lookup, run another import once the 48 hours are up. Once a month is plenty.
If something goes wrong
- "This does not look like the whole Rebrickable downloads page." You probably copied the visible text and not the page source. Go back to step 3.
- "This page is older than your last import." The paste is out of date. Copy the page again, or tick the box to use it anyway.
- "The last import failed." Check free disk space first: the part images need about 6 GB. A failed import does not start the 48-hour wait, so you can try again. Files it already downloaded are kept, and each file is downloaded at most once a day, so a quick retry may be told to wait for one of them.
- You restored from a backup and the pictures are gone. That's expected. Catalog data and images aren't backed up, so run an import again. See restoring.
Catalog data comes from Rebrickable.