I'm trying to modernise a film scanning workflow and need some guidance on how to automate my tasks more efficiently.
So let me first describe the situation and workflow that I need.
The film scanner produces a folder named after the Job Number (eg 2021_1234) with the actual film scans (.bmp) alongside cache/metadata files that are of no use at all (shown here as .xx and .zz). A sample directory is as follows:
~/2021_1234/ 01.xx 02.xx 03.xx 01.zz 02.zz 03.zz 01.bmp 02.bmp 03.bmp
I need the final result to follow this structure:
~/2021_1234/ /2021_1234-TIFF/ 01.tiff 02.tiff 03.tiff /2021_1234-JPEG/ 01.jpg 02.jpg 03.jpg
Essentially the useless metadata files need to be deleted, and the .bmp files need to be converted to both .tiff and .jpeg files in their own subfolders with the Job Number as well.
Ideally I would like to also include LZW compression for the .tiff conversion if possible.
Currently I'm using a combination of manual copy/paste/delete, alongside 2 Automator Applications, 1 each for .jpeg and .tiff conversion. I'm only using a basic Get Specified Finder Items along with Change Type of Images.
It works, but it's not perfect as lots of manual steps still need to be done. Especially when I have to repeat all the steps for multiple jobs.
The ideal solution would allow me to simply drag 1 or multiple Job folders into an Automator Application and have it do all the image conversion, subfolder creation, and deletion of unnecessary files without any intervention on my end.
However, I can't seem to find a way to get the other steps done within Automator, and I get quite confused when I look at sample bash scripts that use sips. Many of the solutions I've seen online only solve one part of the problem that I'm facing (eg, just the image conversion, or just the folder creation), and I'm having trouble understanding the scripting language properly to combine them all together.
Any help with this would be greatly appreciated.