From 894ff92c770320e264961bba55bbf0fba16efe56 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 23 Jul 2018 22:53:17 +0200 Subject: wip. o Support for loading CSV files. --- demo/doit/dodo.py | 14 ++++++++++---- demo/doit/ee/kicad-footprint.csv | 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 demo/doit/ee/kicad-footprint.csv (limited to 'demo') diff --git a/demo/doit/dodo.py b/demo/doit/dodo.py index 27ceb67..858e673 100644 --- a/demo/doit/dodo.py +++ b/demo/doit/dodo.py @@ -1,4 +1,6 @@ import ee.kicad.doit +from ee.kicad.doit import * +from ee.fact import DataSetManager prj = "demo" sch = "{}.sch".format(prj) @@ -6,12 +8,16 @@ kicad_pcb = "{}.kicad_pcb".format(prj) DOIT_CONFIG = {'check_file_uptodate': 'timestamp'} +dsm = DataSetManager("ee") + +kicad_footprint = "kicad-footprint" +dsm.add_ds("csv", kicad_footprint, "kicad-footprint-mapping", path="ee/kicad-footprint.csv") + +ee.kicad.doit.change_data_sets_for_task(task_kicad_create_component_data_set, lambda ds: ds + [kicad_footprint]) + ee.kicad.doit.init( + data_set_manager=dsm, sch=sch, kicad_pcb=kicad_pcb, gerber_dir="gerber", - data_set_dir="ee", ) - -# noinspection PyUnresolvedReferences -from ee.kicad.doit import * diff --git a/demo/doit/ee/kicad-footprint.csv b/demo/doit/ee/kicad-footprint.csv new file mode 100644 index 0000000..a9ccfd7 --- /dev/null +++ b/demo/doit/ee/kicad-footprint.csv @@ -0,0 +1,2 @@ +kicad,common +Resistor_SMD:R_1206_3216Metric,SMD_3216 -- cgit v1.2.3