The idea is very simple:
- A “reference” label is created on the first copper layer, with known placeholders inside text labels;
- The python script is modified by inserting the correct placeholders and the text strings we want on the labels;
- The python script is executed, which replicates the labels on the other copper layers;
- The generated layers are printed and after some cutter work, the labels are ready.
The kicad-ized python script and the example pcbnew project can be downloaded from here (it would not deserve a git repo, but wordpress does not allow uploading zip files…). I used this script to generate some labels to organize the resistors obtaining this:
Of course, to generate different labels both the python script and the pcbnew file must be modified, but it’s very trivial.