← Back to team overview

kicad-developers team mailing list archive

Re: first mail, introducing command line options for eeschema and pcbnew

 

On 1/12/2011 6:47 PM, Wolfgang Spraul wrote:
> Hi,
> 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!

Wolfgang,

Thank you for choosing Kicad.  Your project looks interesting from what
I can see.

> 
> 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...
> http://projects.qi-hardware.com/schhist/xue/
> 
> 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
> 
> ------

I'm sure this is something Kicad users would be interested in.  It has
been discussed in the past.

> 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.

The current version is 2730 so I'm not sure how cleanly your patches
would apply.  Quite a lot has changed since version 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.

We have been working on that.  The testing branch should be much better
in that regard compared to 2448.

> 
> kicad bzr 2448 command line patches:
> http://projects.qi-hardware.com/p/eda-tools/source/tree/master/kicad-patches/scripted-eeschema.patch
> http://projects.qi-hardware.com/p/eda-tools/source/tree/master/kicad-patches/scripted-pcbnew.patch
> http://projects.qi-hardware.com/p/eda-tools/source/tree/master/kicad-patches/scripted-new.patch
> http://projects.qi-hardware.com/p/eda-tools/source/tree/master/kicad-patches/scripted-common.patch
> 
> 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.

I am interested as long as the patches are not too disruptive to the
stability of Kicad and they don't require a lot of ugly conditional
compilation.

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

Before you send the patches, please format your code according to
<path_to_kicad_src>/Documentation/coding_style_policy.pdf.  You should
also make sure you patches apply cleanly to the latest version of the
testing branch of the source.  You can send the patches to this mailing
list with [PATCH] in the subject line so that other developers can
easily see that this is a patch submission.  You've certainly done some
interesting work.  I'm sure I won't be alone in looking forward to your
patches.

Thanks,

Wayne

> 
> So much for now, thanks a lot for KiCad, and happy hacking,
> Wolfgang
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 



Follow ups

References