Skip to content

Python script for batch-rendering images of individual LDraw parts from CSV input.

License

Notifications You must be signed in to change notification settings

johnholbrook/ldraw-part-images.py

Repository files navigation

ldraw-part-images.py

Python script for batch-rendering images of individual LDraw parts from CSV input.

Requires LeoCAD to be isntalled and accessible from the command line – in macOS, I did this by adding /Applications/LeoCAD.app/Contents/MacOS to my $PATH.

Example usage

$ python3 generate_images.py --csv-template
$ cat template.csv
File Name,Number,Color Code,Latitude,Longitude
$ python3 generate_images.py -i super-kit-tray.csv -o images
$ python3 generate_images.py --help
usage: generate_images.py [-h] [-i input.csv] [-o path/to/dir] [--csv-template]

Batch-generate images of LDraw parts from a CSV file.

optional arguments:
  -h, --help      show this help message and exit
  -i input.csv    Input CSV file
  -o path/to/dir  Output directory (will be created if it doesn't exist)
  --csv-template  Output a blank CSV file of the correct format to template.csv

About

Python script for batch-rendering images of individual LDraw parts from CSV input.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages