You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be more involved than it sounds, but it would be handy to create thumbnails for all stl files in a directory. As well as an option to traverse directories to find stl to process. I wrote a simple bash script to do this for me (it is very verbose, not error handling, etc):
traverse() {
for entry in "$1"/*
do
if [ -d "$entry" ]; then
echo "$entry is a directory, stepping in"
traverse "$entry"
else
extension="${entry##*.}"
filename="${entry%.*}"
echo "$entry is a file, file name is $filename and extension is $extension"
if [ "${extension,,}" = "stl" ]; then
echo "Making thumbnail"
stl-thumb "$entry" "$filename.png"
fi
fi
done
}
traverse "$1"