bom: change input to xml as more plugins can parse it

This commit is contained in:
Pierre Chevalier 2020-10-18 23:39:44 +01:00
parent bbf9a9d2a5
commit b719d11f91
19 changed files with 15810 additions and 12732 deletions

2
.gitignore vendored
View File

@ -12,7 +12,7 @@
*.kicad_pcb-bak
*.sch-bak
*~
*.~lock
*.~lock*
_autosave-*
*.tmp
*-save.pro

File diff suppressed because it is too large Load Diff

1785
0.1/base/ferris.xml Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1787
0.1/compact/ferris.xml Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1785
0.1/high/ferris.xml Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1785
0.1/low/ferris.xml Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2604
0.2/bling/ferris.xml Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2014
0.2/compact/ferris.xml Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2014
0.2/high/ferris.xml Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2014
0.2/mini/ferris.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -19,11 +19,11 @@ rule 0_1_base_ibom
command = python $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.1/base/ferris.kicad_pcb --dest-dir ../../build/0.1/base $
--netlist-file 0.1/base/ferris.net --extra-fields "LCSC Part #" $
--netlist-file 0.1/base/ferris.xml --extra-fields "LCSC Part #" $
--dnp-field "DNP" --no-browser
build build/0.1/base/ibom.html: 0_1_base_ibom $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.1/base/ferris.kicad_pcb 0.1/base/ferris.net
0.1/base/ferris.kicad_pcb 0.1/base/ferris.xml
rule 0_1_base_erc
command = ./run_erc.sh 0.1/base && touch build/0.1/base/erc_success
@ -84,11 +84,11 @@ rule 0_1_compact_ibom
command = python $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.1/compact/ferris.kicad_pcb --dest-dir ../../build/0.1/compact $
--netlist-file 0.1/compact/ferris.net --extra-fields "LCSC Part #" $
--netlist-file 0.1/compact/ferris.xml --extra-fields "LCSC Part #" $
--dnp-field "DNP" --no-browser
build build/0.1/compact/ibom.html: 0_1_compact_ibom $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.1/compact/ferris.kicad_pcb 0.1/compact/ferris.net
0.1/compact/ferris.kicad_pcb 0.1/compact/ferris.xml
rule 0_1_compact_erc
command = ./run_erc.sh 0.1/compact && touch build/0.1/compact/erc_success
@ -155,11 +155,11 @@ rule 0_1_high_ibom
command = python $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.1/high/ferris.kicad_pcb --dest-dir ../../build/0.1/high $
--netlist-file 0.1/high/ferris.net --extra-fields "LCSC Part #" $
--netlist-file 0.1/high/ferris.xml --extra-fields "LCSC Part #" $
--dnp-field "DNP" --no-browser
build build/0.1/high/ibom.html: 0_1_high_ibom $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.1/high/ferris.kicad_pcb 0.1/high/ferris.net
0.1/high/ferris.kicad_pcb 0.1/high/ferris.xml
rule 0_1_high_erc
command = ./run_erc.sh 0.1/high && touch build/0.1/high/erc_success
@ -218,11 +218,11 @@ rule 0_1_low_ibom
command = python $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.1/low/ferris.kicad_pcb --dest-dir ../../build/0.1/low $
--netlist-file 0.1/low/ferris.net --extra-fields "LCSC Part #" $
--netlist-file 0.1/low/ferris.xml --extra-fields "LCSC Part #" $
--dnp-field "DNP" --no-browser
build build/0.1/low/ibom.html: 0_1_low_ibom $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.1/low/ferris.kicad_pcb 0.1/low/ferris.net
0.1/low/ferris.kicad_pcb 0.1/low/ferris.xml
rule 0_1_low_erc
command = ./run_erc.sh 0.1/low && touch build/0.1/low/erc_success
@ -281,11 +281,11 @@ rule 0_2_bling_ibom
command = python $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.2/bling/ferris.kicad_pcb --dest-dir ../../build/0.2/bling $
--netlist-file 0.2/bling/ferris.net --extra-fields "LCSC Part #" $
--netlist-file 0.2/bling/ferris.xml --extra-fields "LCSC Part #" $
--dnp-field "DNP" --no-browser
build build/0.2/bling/ibom.html: 0_2_bling_ibom $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.2/bling/ferris.kicad_pcb 0.2/bling/ferris.net
0.2/bling/ferris.kicad_pcb 0.2/bling/ferris.xml
rule 0_2_bling_erc
command = ./run_erc.sh 0.2/bling && touch build/0.2/bling/erc_success
@ -347,11 +347,11 @@ rule 0_2_compact_ibom
command = python $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.2/compact/ferris.kicad_pcb --dest-dir ../../build/0.2/compact $
--netlist-file 0.2/compact/ferris.net --extra-fields "LCSC Part #" $
--netlist-file 0.2/compact/ferris.xml --extra-fields "LCSC Part #" $
--dnp-field "DNP" --no-browser
build build/0.2/compact/ibom.html: 0_2_compact_ibom $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.2/compact/ferris.kicad_pcb 0.2/compact/ferris.net
0.2/compact/ferris.kicad_pcb 0.2/compact/ferris.xml
rule 0_2_compact_erc
command = ./run_erc.sh 0.2/compact && touch build/0.2/compact/erc_success
@ -418,11 +418,11 @@ rule 0_2_high_ibom
command = python $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.2/high/ferris.kicad_pcb --dest-dir ../../build/0.2/high $
--netlist-file 0.2/high/ferris.net --extra-fields "LCSC Part #" $
--netlist-file 0.2/high/ferris.xml --extra-fields "LCSC Part #" $
--dnp-field "DNP" --no-browser
build build/0.2/high/ibom.html: 0_2_high_ibom $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.2/high/ferris.kicad_pcb 0.2/high/ferris.net
0.2/high/ferris.kicad_pcb 0.2/high/ferris.xml
rule 0_2_high_erc
command = ./run_erc.sh 0.2/high && touch build/0.2/high/erc_success
@ -481,11 +481,11 @@ rule 0_2_mini_ibom
command = python $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.2/mini/ferris.kicad_pcb --dest-dir ../../build/0.2/mini $
--netlist-file 0.2/mini/ferris.net --extra-fields "LCSC Part #" $
--netlist-file 0.2/mini/ferris.xml --extra-fields "LCSC Part #" $
--dnp-field "DNP" --no-browser
build build/0.2/mini/ibom.html: 0_2_mini_ibom $
tools/InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py $
0.2/mini/ferris.kicad_pcb 0.2/mini/ferris.net
0.2/mini/ferris.kicad_pcb 0.2/mini/ferris.xml
rule 0_2_mini_erc
command = ./run_erc.sh 0.2/mini && touch build/0.2/mini/erc_success

View File

@ -44,8 +44,8 @@ def make_pcb_file_name(variant):
return f"{variant}/ferris.kicad_pcb"
def make_netlist_file_name(variant):
return f"{variant}/ferris.net"
def make_raw_bom_file_name(variant):
return f"{variant}/ferris.xml"
def make_sch_file_name(variant):
@ -100,16 +100,16 @@ def add_interactive_bom_rule(ninja, variant):
out_dir = f"../../{OUTPUT_DIR}/{variant}"
ibom_output = make_output_file_path(variant, "ibom.html")
pcb = make_pcb_file_name(variant)
net = make_netlist_file_name(variant)
raw_bom = make_raw_bom_file_name(variant)
ibom_rule = make_rule_name(variant, "ibom")
ninja.rule(
name=ibom_rule,
command=[
f'python {ibom_generator} {pcb} --dest-dir {out_dir} --netlist-file {net} --extra-fields "LCSC Part #" --dnp-field "DNP" --no-browser'
f'python {ibom_generator} {pcb} --dest-dir {out_dir} --netlist-file {raw_bom} --extra-fields "LCSC Part #" --dnp-field "DNP" --no-browser'
],
)
ninja.build(
inputs=[ibom_generator, pcb, net],
inputs=[ibom_generator, pcb, raw_bom],
outputs=[ibom_output],
rule=ibom_rule,
)