patkan/pcb2gcode — pull request #9 by Corna (2014-12-04 14:50:13+00:00)
Title: Added preamble-text option

I've added a preamble-text option, that takes the file, comment it (converting each rounded parenthesis in an angled parenthesis and putting each line in rounded parenthesis) and put it at the beginning of each output file, just after the ( pcb2gcode x.x.x ) line.
I find it useful to easily embeed license headers or copyright statements at the top of the gcode file.
For example
pcb2gcode --preamble-text CERN_OHL_HEADER.txt --preamble preamble.ngc [...]

`CERN_OHL_HEADER.txt`

Copyright Nicola Corna 2014 (nicola@corna.info)

This documentation describes Open Hardware and is licensed under the
CERN OHL v. 1.2.

You may redistribute and modify this documentation under the terms of the
CERN OHL v.1.2. (http://ohwr.org/cernohl). This documentation is distributed
WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING OF
MERCHANTABILITY, SATISFACTORY QUALITY AND FITNESS FOR A
PARTICULAR PURPOSE. Please see the CERN OHL v.1.2 for applicable
conditions`

`preamble.ngc`

( Put your custom preambles in this file )

`front.ngc`

( pcb2gcode 1.1.5 )

( Copyright Nicola Corna 2014 )

( This documentation describes Open Hardware and is licensed under the )
( CERN OHL v. 1.2. )

( You may redistribute and modify this documentation under the terms of the )
( CERN OHL v.1.2. . This documentation is distributed )
( WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING OF )
( MERCHANTABILITY, SATISFACTORY QUALITY AND FITNESS FOR A )
( PARTICULAR PURPOSE. Please see the CERN OHL v.1.2 for applicable )
( conditions )

( Put your custom preambles in this file )

G94 ( Millimeters per minute feed rate. )
G21 ( Units == Millimeters. )

G90 ( Absolute coordinates. )
S11000 ( RPM spindle speed. )
[...]