This patch allows the use of some important KiCost features from another Python script:
kicost.kicost.query_part_info to collect the parts information. You only need to pass a parts structure.
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.
This patch allows the use of some important KiCost features from another Python script:
kicost.kicost.query_part_info
to collect the parts information. You only need to pass aparts
structure.kicost.spreadsheet.create_worksheet
and thekicost.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.