aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-02-27 16:09:53 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2019-02-27 16:09:53 +0100
commit0ce5c1e6dcea6643cf72de885c0aca52bf4ac28c (patch)
treeef9109b762a46079ce91aa3376f727aa76abf8b8 /src/ee/tools
parentf14a40a4f80275daceeb73f944e1aa1f84d16c79 (diff)
downloadee-python-0ce5c1e6dcea6643cf72de885c0aca52bf4ac28c.tar.gz
ee-python-0ce5c1e6dcea6643cf72de885c0aca52bf4ac28c.tar.bz2
ee-python-0ce5c1e6dcea6643cf72de885c0aca52bf4ac28c.tar.xz
ee-python-0ce5c1e6dcea6643cf72de885c0aca52bf4ac28c.zip
o Always sorting index.xml for better git diffs.
o Normalizing more Digikey facts. o When creating distributor search lists, create a new plain <part> with containing only the part numbers.
Diffstat (limited to 'src/ee/tools')
-rw-r--r--src/ee/tools/digikey_normalize_facts.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ee/tools/digikey_normalize_facts.py b/src/ee/tools/digikey_normalize_facts.py
new file mode 100644
index 0000000..07cc0d7
--- /dev/null
+++ b/src/ee/tools/digikey_normalize_facts.py
@@ -0,0 +1,19 @@
+import argparse
+from pathlib import Path
+
+from ee.digikey.normalize_facts import normalize_facts
+
+parser = argparse.ArgumentParser()
+
+parser.add_argument("--in",
+ dest="in_",
+ required=True,
+ metavar="FILE")
+
+parser.add_argument("--out",
+ required=True,
+ metavar="FILE")
+
+args = parser.parse_args()
+
+normalize_facts(Path(args.in_), Path(args.out))