voronstl/exercises/create_glb_links
2026-03-05 13:53:27 -08:00
..
README.md safety, glbs now have no sanitizing of file names; png & webP conversions work 2026-03-05 13:53:27 -08:00

Goal

Place soft links to the glb files created by Blender in the staging tree in a single directory, web/batch_glb_png/glbs, , so the glb->PNG converter can easily process a set of files in one directory and not have to navigate the staging tree.

Introduction

This is a simple run-a-script exercise. (Note: the name of the link has the complete directory path as part of the link name rather than a 1:1 match of the file name it links to.)

Steps

In a command console:

 cd ...web/batch_glb_png
 date; time ./link_glbs.sh [PATH to the root directory of your GitHub staging area]

You can verify how many links were created using:

...web/batch_glb_png $ ls -la glbs/ |wc -l

Example:

jlpoole@jp ~/work/Voron/voronstl/web/batch_glb_png $ date; time ./link_glbs.sh /home/jlpoole/work/Voron/test1
Wed Mar  4 18:51:15 PST 2026
ROOT:    /home/jlpoole/work/Voron/test1
OUTDIR:  /home/jlpoole/work/Voron/voronstl/web/batch_glb_png/glbs
LOG:     link_glbs_20260304_185115.log


DONE. linked=131 skipped=0
0 (details in link_glbs_20260304_185115.log)

real    0m0.507s
user    0m0.569s
sys     0m0.263s
jlpoole@jp ~/work/Voron/voronstl/web/batch_glb_png $ ls -la glbs/ |wc -l
136
jlpoole@jp ~/work/Voron/voronstl/web/batch_glb_png $ 

And, the script can be run over-and-over again and not step on previously created links.

Example, see "skipped=131" below:

jlpoole@jp ~/work/Voron/voronstl/web/batch_glb_png $ date; time ./link_glbs.sh /home/jlpoole/work/Voron/test1
Wed Mar  4 19:04:07 PST 2026
ROOT:    /home/jlpoole/work/Voron/test1
OUTDIR:  /home/jlpoole/work/Voron/voronstl/web/batch_glb_png/glbs
LOG:     link_glbs_20260304_190407.log


DONE. linked=0
0 skipped=131 (details in link_glbs_20260304_190407.log)

real    0m0.584s
user    0m0.645s
sys     0m0.333s
jlpoole@jp ~/work/Voron/voronstl/web/batch_glb_png $