← Back to team overview

kicad-developers team mailing list archive

first mail, introducing command line options for eeschema and pcbnew


I'm just a member of this list for a few days, so forgive me if
I'm not very aware of 'well known' procedures around here...

I am participating in the Qi copyleft hardware project
(www.qi-hardware.com), and we use KiCad as our central EDA tool
for schematics and PCB layout. Already for about 1.5 years now :-)
A great piece of software, thanks a lot for making this possible!

We like to automate our processes as much as possible (like driving
things from Makefiles), and we also like to automate things on our
server, such as the schematics histories we are creating automatically
from KiCad files...

In order to do this, we added some command line options to eeschema
and now also pcbnew.
Right now we have the following options implemented:

eeschema [-h] [-l] [-p <str>] [-plot-bw] [-plot-sheetref] [-b] [-e] [-n] <path to .sch file>
  -h, --help                     	displays help on the command line parameters
  -l, --list-sheets              	list schematics pages
  -p, --plot=<str>               	plots the board [ps|svg|dxf]
  -plot-bw, --plot-bw            	plot: black & white (default: color)
  -plot-sheetref, --plot-sheetref	plot: print sheet reference (default: off)
  -b, --bom                      	generate bill of materials (.bom)
  -e, --erc                      	generate electric rules check (.erc) file
  -n, --netlist                  	generate netlist (.net)

pcbnew [-h] [-d] [-list-layers] [-p <str>] [-l <str>] [-ps-pads-drill-opt <str>] [-mirror] [-fill-all-zones] [-drc] [-svg] [-svg-merge] [-svg-edge] [-pos] [-bom] [-cmp] [-vrml] <path to .brd file>
  -h, --help                                   	displays help on the command line parameters
  -d, --drill                                  	generates a .drl drill file
  -list-layers, --list-layers                  	lists the names of all enabled layers in the .brd file
  -p, --plot=<str>                             	plots the board [hpgl|gerber|ps|ps_a4|dxf]
  -l, --layers=<str>                           	comma separated list of layer names (default: all enabled layers)
  -ps-pads-drill-opt, --ps-pads-drill-opt=<str>	Postscript pads drill option [none|small|real] (default:small)
  -mirror, --mirror                            	mirror plot (HPGL and Postscript only)
  -fill-all-zones, --fill-all-zones            	fill zones before plotting
  -drc, --drc                                  	generates a design rule check report (.rpt)
  -svg, --svg                                  	plots the board in SVG format
  -svg-merge, --svg-merge-layers               	merge layers into one SVG file
  -svg-edge, --svg-board-edges                 	add board edges to SVG plots
  -pos, --pos                                  	create front and back .pos component position files
  -bom, --bom                                  	create a .csv bom
  -cmp, --cmp                                  	recreate .cmp components file for CvPcb
  -vrml, --vrml                                	generates a .wrl vrml board representation

We are picking a KiCad revision from launchpad, and update it 'when
necessary'. Right now we are using bzr 2448, so the patches I have
also refer to 2448.
After having added the command line options to KiCad, I am quite
impressed about the code quality. As you can see in my patches, I did
have to do a number of ugly hacks to get stuff working, and certainly
it will be maintenance heavy when upgrading KiCad. But overall the
class design and separation of gui and data model is not bad.

kicad bzr 2448 command line patches:

The purpose of this mail is to introduce the eeschema and pcbnew command
line options I added, and will continue to maintain. I would like to
start sending small patches to you guys that would make it easier for me
to implement the command line behavior without ugly hacks in the KiCad
sources. Most of these patches will be small things that just rearrange
logic (like separation between gui and data model), and not otherwise
affect KiCad features. Of course in the long run we may get the entire
command line patches into KiCad proper, if anybody is interested. But
my first goal is to help cleaning up the KiCad sources to make command
line options easier.

Is anybody interested in this? Can I send those patches to this mailing
list, or is another form of contribution preferred?

So much for now, thanks a lot for KiCad, and happy hacking,

Follow ups