Great script @John6666 , I currently try to port a beautiful dataset of https://idr.openmicroscopy.org/study/idr0012/ to Croissant and would maybe use your solution.
Did you find a way to manually supply a Croissant descriptor? I have a script that converts my metadata to JSON-LD, so thought to take it from there with a manual Croissant JSON-LD after.