aboutsummaryrefslogtreecommitdiff
path: root/src/ee/digikey
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-05-21 07:57:12 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-05-21 07:57:12 +0200
commitc8c04a73fef2e2f365d448a067bc5a6c8b20bebb (patch)
tree1db4475641dc6f8b914e4940145be86e2a167c80 /src/ee/digikey
parent9bbb4f8f3a1d8e2bfe1f06c945081153435de940 (diff)
downloadee-python-c8c04a73fef2e2f365d448a067bc5a6c8b20bebb.tar.gz
ee-python-c8c04a73fef2e2f365d448a067bc5a6c8b20bebb.tar.bz2
ee-python-c8c04a73fef2e2f365d448a067bc5a6c8b20bebb.tar.xz
ee-python-c8c04a73fef2e2f365d448a067bc5a6c8b20bebb.zip
o Creating a map_footprints function for digikey's footprints similar to
kicad's function.
Diffstat (limited to 'src/ee/digikey')
-rw-r--r--src/ee/digikey/functions.py9
1 files changed, 9 insertions, 0 deletions
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]