aboutsummaryrefslogtreecommitdiff
path: root/exports.py
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2018-10-12 17:02:51 -0400
committerHubert Chathi <hubert@uhoreg.ca>2018-10-12 17:02:51 -0400
commit5cf074d3372f1e189fe410a075013adefabb1aa5 (patch)
treea72a96fafab69e62b5083cbe1933b4e34e9a72d5 /exports.py
parentac071d9c0d69e4330a06f171e3bddc713ecd97d6 (diff)
parentaf86a9a8b899eeb3c1c464cb0c54218acd788fa6 (diff)
Merge branch 'master' into poljar
Diffstat (limited to 'exports.py')
-rwxr-xr-xexports.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/exports.py b/exports.py
new file mode 100755
index 0000000..b37cbbb
--- /dev/null
+++ b/exports.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+
+import sys
+import re
+import json
+
+expr = re.compile(r"(olm_[^( ]*)\(")
+
+exports = set()
+
+for f in sys.argv[1:]:
+ with open(f) as fp:
+ for line in fp:
+ matches = expr.search(line)
+ if matches is not None:
+ exports.add('_%s' % (matches.group(1),))
+
+json.dump(sorted(exports), sys.stdout)