diff options
author | David Baker <dave@matrix.org> | 2018-10-12 08:22:57 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2018-10-12 08:22:57 +0100 |
commit | 50ed20f61e76c4569c001cf8acb6e5bc361957b3 (patch) | |
tree | 0224871c07b0a98989e122c1937606a1857a2aa4 /exports.py | |
parent | fac1d52dfe25d8bf6119cc41645a84c9111c6f6e (diff) | |
parent | b2d91f55ece853ca1a398d3c6814f18a3f10bee0 (diff) |
Merge remote-tracking branch 'origin/master' into dbkr/pk_private_export_import
Diffstat (limited to 'exports.py')
-rwxr-xr-x | exports.py | 18 |
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) |