Skip to content

Commit

Permalink
1-click-bom patch
Browse files Browse the repository at this point in the history
  • Loading branch information
emard committed Mar 22, 2019
1 parent 4fe4a09 commit b554999
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tools/1clickbom.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/output_scripts/kicad/1-click-bom_fields.py b/output_scripts/kicad/1-click-bom_fields.py
index cd0d5a0..f1eab4c 100644
--- a/output_scripts/kicad/1-click-bom_fields.py
+++ b/output_scripts/kicad/1-click-bom_fields.py
@@ -9,6 +9,7 @@ import kicad_netlist_reader
import csv
import sys
import os
+import re

def myEqu(self, other):
"""myEqu is a more advanced equivalence function for components which is
@@ -65,6 +66,9 @@ partfields -= set( ['Reference', 'Value', 'Datasheet', 'Footprint'] )

columnset = compfields | partfields # union

+
+ignore_columns = re.compile('[A-z0-9]*_URL|price')
+columnset = [c for c in columnset if ignore_columns.match(c) is None]
# prepend an initial 'hard coded' list and put the enchillada into list 'columns'
columns = ['References', 'Qty'] + sorted(list(columnset))

0 comments on commit b554999

Please sign in to comment.