Using ChatGPT for good
aka too lazy to learn Lua from scratch
Sometimes you want a simple solution to a problem. In my case I develop a ton of film at home, and am somewhat meticulous with my logging in Lightroom Classic as I move items from 'Imported' (i.e. in progress or unedited) to 'Processed' (which is code word for running through Negative Lab Pro and doing edits on .jpg positives).

This helps me out in determining how much chemistry I've gone through as it dovetails with my development numbering scheme I've used to help remind me to dispose of chemicals once they've either reached exhaustion or the time is greater than 4-ish weeks since initial mixing.
Unfortunately, Lightroom Classic doesn't put totals in the Collection Set
Folders, leaving me to guess how many rolls I've processed. Since there is no public API for Lightroom Classic, I asked ChatGPT how I could go about querying how many Smart Folders I had in each collection set.
The answer was you need to generate a custom Lightroom Classic plugin utilizing Lua Script
I didn't feel like learning another scripting language for a one off task, so I just prompted the agent for what I wanted as output, and gave it the input parameters and restrictions, and after 3 iterations, got the desired output. This took all of 5 minutes. The hardest part? I didn't actually know how to run it once I installed the custom plugin. 🤓
I now have a quick way to check how many rolls are in each of my subcategories.
Life before the plugin

My new and improved life afterward


Known Edge Cases
- Only counting the
Processed
Items. It will currently not count any in ProgressImported
rolls. I'm ok with that for now
The Future
- I may extend the functionality further to count how many images I've shot. That is a little tricky as I often create
.jpg
positives in Negative Lab Pro so if there is a sidecar file, I don't want to double count.
You can check out the source code, or simply download the zip file and try it for yourself.