A PostProcessingPlugin Script is an easy way to modify gcode before it gets written onto disk.
A Python script is executed and handed over the full gcode.
The script is expected to return a gcode as a list of lines.
Here is how you do it.
Find where your configuration folder is.
1. Click Help menu item.
2. Click "Show Configuration Folder".
3. Find the folder call "scripts".
If you don't see one create one in the configuration folder.
4. Place the python script (with file extension .py) into the script folder.
5. Restart Cura.
Now you should be able to see the newly added post processing script
1. Click Extensions -> Post Processing -> Modify G-Code
2. Click “Add a script”
3. The newly added script name should appear in the dropdown list