RE: LEGO 2 LDraw 2 BL
2019-04-14, 10:47 (This post was last modified: 2019-04-14, 10:49 by David Manley.)
2019-04-14, 10:47 (This post was last modified: 2019-04-14, 10:49 by David Manley.)
The PowerShell script in the zip file has been updated. It is a bit "gentler" when querying Rebrickable and the shortage of parts being retrieved has been resolved.
Comments:
2. I suggest you alter the PowerShell script part_mapping_generate.ps1 on line 48 69 and update it with the path to your installation of saxon. You can pass this value in as a command line parameter if you so wish but I suggest this will quickly become tiresome.
Do something similar for the curl executable location on line 68.
3. While the output format appears to be okay, I need to do some checks on whether all the parts have been output. According to Rebrickable's website, they have 32 000+ parts in their database. The generated XML file currently contains 5 000+ parts. I'll to a bit of digging into this.
This has been resolved. I believe all parts are now being retrieved.
Usage:
David
Comments:
2. I suggest you alter the PowerShell script part_mapping_generate.ps1 on line 48 69 and update it with the path to your installation of saxon. You can pass this value in as a command line parameter if you so wish but I suggest this will quickly become tiresome.
Do something similar for the curl executable location on line 68.
3. While the output format appears to be okay, I need to do some checks on whether all the parts have been output. According to Rebrickable's website, they have 32 000+ parts in their database. The generated XML file currently contains 5 000+ parts. I'll to a bit of digging into this.
This has been resolved. I believe all parts are now being retrieved.
Usage:
- The command is invoked from the Powershell command line thusly;
.\part_mapping_generate.ps1 your-api-key xml-output-file-name json-output-file-name
- The parameter values influence its behaviour
- .\part_mapping_generate.ps1 your-api-key
Queries rebrickable and output XML to standard output
- .\part_mapping_generate.ps1 your-api-key abc.xml -output_progress 1
Queries rebrickable and output XML to the file abc.xml and displays progress when querying Rebrickable.
- .\part_mapping_generate.ps1 your-api-key abc.xml abc.jsn -output_progress 1
Queries rebrickable, output XML to the file abc.xml and JSON interim output to abc.jsn and displays progress when querying Rebrickable.
- .\part_mapping_generate.ps1 "" abc.xml abc.jsn
Takes its JSON input from abc.jsn rather than querying rebrickable and output XML to the file abc.xml
- .\part_mapping_generate.ps1 "" "" abc.jsn
Takes its JSON input from abc.jsn rather than querying rebrickable and output XML to standard output
David