← Back to team overview

kicad-developers team mailing list archive

Re: BOM support


On 25 August 2010 01:30, Brian Sidebotham <brian.sidebotham@xxxxxxxxx> wrote:
> Hi Guys,
> I have attached a first effort for some python scripts. Still some
> work to do, but there are some example BOM generators which create
> list, csv and html versions of a BOM.
> The code should work with anything above python 2.3 (including 3.x) so
> we shouldn't have any issues with python versions. The main stumbling
> block appears to be string formatting. The % method is soon to be
> deprecated in the 3.x series of python. V2.7 is apparently going to be
> the last version in the 2.x series. Development will now only
> concentrate on the 3.x series.
> The reader I implemented creates a complete netlist tree in RAM, so
> everything is available to do with what you want.
> The examples start easy, and get more complex:
> bom_example1.py - Create a simple list, one component per line, tab
> delimited (similar to kicad original BOM output)
> bom_example2.py - As above, but CSV output, suitable for open office
> or excel, etc.
> bom_example3.py - As (2), but with components grouped by matching
> values + library parts
> bom_example4.py - As (3), but HTML format instead
> bom_example5.py - Demonstration of a more sophisticated method of
> output formatting and grouping technique

bom_example5.py does not do more sophisticated output formatting, but
does include a custom component grouping method

I've done some quick tidying up, and have added two more scripts:

round_robin.py - loads the XML tree, and exports the same XML tree
round_value_robin.py - loads the XML tree, performs some value monging
and then exports the XML tree

I've added a few more helper functions and rearranged a few things too.

Best Regards,


Attachment: ky2.zip
Description: Zip archive

Follow ups