I have a standalone perl script that modifies the Cura generated gCode.
The main functions include :
- count the total number of layers in the file
- count the total number of print lines in the file
- at each layer change, add an M117 gCode to show :
layer count / total layers % of layers % of lines
for example :
M117 L 27/270 10% 14% ( = on layer 27 of 270, 10% thru the layers and 14% thru the lines to print )
I am using the existing plugin M117navbar to display the data in the Octoprint browser window.
Is there a way to turn this in to a plugin that modifies the gCode file as it is uploaded instead of having to run the gCode file thru a perl script ?