Rakefile: minor, improve readability

This commit is contained in:
King Kévin 2022-01-28 18:44:48 +01:00
parent 786947f2fb
commit d21265f083
1 changed files with 2 additions and 2 deletions

View File

@ -123,9 +123,9 @@ end
desc "generate BOM file from schematic"
rule ".bom.csv" => ".sch" do |t|
attributes = ["device", "value", "description", "footprint", "manufacturer", "mpn", "datasheet", "lcsc", "digikey"]
bom_data = bom2(t.prerequisites[0],attributes)
bom_data = bom2(t.prerequisites[0], attributes)
CSV.open(t.name, "wb") do |csv|
all_attributes = ["refdes","qty"]+attributes
all_attributes = ["refdes","qty"] + attributes
csv << all_attributes
bom_data.each do |line|
csv << all_attributes.collect{|attribute| line[attribute]}