G-Code post processing script development

Aloha Folks,

I am using a Taz 6 and Cura Lulzbot Edition v3.6.36 and I am interested in developing python scripts for the post processing of G-Code. There doesn’t seem to be much documentation out there although I was able to get going with the help of this article.
If anyone has links to more resources, I would love to have them.

I have now run into a strange issue in the “execute” function. This function is passed an array where each index contains all the G-Code for a single print layer. I have noticed that no matter what 3d model I am slicing, the the fifth index from the end contains the G-Code for that layer and the one after it. So if I had a 100 layer print, layer 95 would contain the G-Code for layer 95 as well as layer 96. This is a problem if there is G-Code I want to modify at every layer because layer 96 is not indexed in the array. I am aware that I can fix this issue myself by singling out that array index, split it up and add the 96th layer into the array manually but wanted to see if anyone can confirm this behavior and to possibly report a bug.