2018-11-11 23:06:04 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
import argparse
|
|
|
|
import os
|
|
|
|
import json
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
parser = argparse.ArgumentParser()
|
2019-09-17 19:53:40 +00:00
|
|
|
parser.add_argument(dest="output", help="Output file")
|
2020-03-11 17:49:11 +00:00
|
|
|
parser.add_argument(dest="plugins", help="The list of plugins")
|
2018-11-11 23:06:04 +00:00
|
|
|
|
|
|
|
options = parser.parse_args()
|
|
|
|
|
|
|
|
all_paths = set()
|
2020-03-11 17:49:11 +00:00
|
|
|
for plugin in options.plugins.split(os.pathsep):
|
2018-11-11 23:06:04 +00:00
|
|
|
all_paths.add(os.path.dirname(plugin))
|
|
|
|
|
2019-09-17 19:53:40 +00:00
|
|
|
with open(options.output, "w") as f:
|
2018-11-11 23:06:04 +00:00
|
|
|
json.dump(list(all_paths), f, indent=4, sort_keys=True)
|