Although this may actually belong in the programming forum, I figure that more Slackware users will see it here and maybe use it and/or improve upon it (I'm not exactly a programmer, but am just able ...
Most of our beloved tools, such as Slic3r, Cura or KISSlicer, offer scripting interfaces that help a great deal if your existing 3D printing toolchain has yet to learn how to produce decent results ...