From c8c04a73fef2e2f365d448a067bc5a6c8b20bebb Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 21 May 2019 07:57:12 +0200 Subject: o Creating a map_footprints function for digikey's footprints similar to kicad's function. --- src/ee/digikey/functions.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/ee/digikey') diff --git a/src/ee/digikey/functions.py b/src/ee/digikey/functions.py index 047fad1..c902b71 100644 --- a/src/ee/digikey/functions.py +++ b/src/ee/digikey/functions.py @@ -140,9 +140,18 @@ def normalize_facts(**kwargs): return on_part +# noinspection PyUnusedLocal +def map_footprint(footprint_mappings=None, **kwargs): + # noinspection PyProtectedMember + from ee.part._utils import map_footprint + + return map_footprint(footprint_mappings, "digikey-to-common", uris.make_digikey_fact_key(16)) + + def default(**kwargs): function_factories = [ normalize_facts, + map_footprint, ] functions = [factory(**kwargs) for factory in function_factories] -- cgit v1.2.3