Customize gerber files content

Hi, the default gerber files contain comments section with actual time. I would like to customize the comment section and remove the time/date information or entire comment section.
I need the files to be identical when there is no change in the data. The time stamp string will make the content different for any versioning system or a simple file compare, Then it is not possible to see if there was real change in the data.
How can I do that in latest kicad 6?
I can write something to post process the files, but that is not preferred solution for many reasons so I am looking for some built in way.

I don’t know of any settings for disabling/customizing the gerber output, so the postprocessing (delete all comment-lines from the gerbers) would be the way to go.

I would not remove all comment lines. They are there for a reason. Just remove the offending line. Do not change more than is needed.

You could write a simple script where you remove this part. This is a simple oneliner in bash, to remove the first 3 lines:

for i in ./path/to/gerbers/*gbr ; do tail -n +4 "$i" | sponge "$i" ; done

Assuming you have moreutils installed. Or you can write your own version in our favourite programming language.

Yes i know you don’t like postprocessing it, but till you have a KiCad version that allows you to do that you have to do it this way.

Why not just sed -i 1,3d "$i" inside the loop?

Thanks for all replies. Looks like there really is no built in way at the moment. It found a python api, so will try use that to script all the production files. Compare to bash it would be understandable by “non hackers” and should work on win and mac even without opening a command line.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.