hildogjr / KiCost

Build cost spreadsheet for a KiCad project.
MIT License
496 stars 97 forks source link

Export functionality #461

Closed set-soft closed 3 years ago

set-soft commented 3 years ago

This patch allows the use of some important KiCost features from another Python script:

  1. kicost.kicost.query_part_info to collect the parts information. You only need to pass a parts structure.
  2. kicost.spreadsheet.create_worksheet and the kicost.spreadsheet.Spreadsheet class can be used to add the costs worksheet to an already existing spreadsheet.

These patches will need more adjusts but I think they are a good starting point. Using them I was able to generate a KiBot BoM with the addition of two work sheets, one for fitted components and the other for DNF components. I used real components (only a couple different), so I got real costs, not --no_price equivalent.