Ugh god damn it I needed to write a small program in a language I dont know very well and whose ecosystem Im not familiar with at all to do something super specific and it is with deep regret I must announce that chat gpts solution is 90% correct and saved me hours of googling