From 85d042dd454aaf9a2c312d3a5fc911d19f6d7f5d Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Sun, 20 Jan 2019 11:05:14 +0100 Subject: [PATCH] chg: [tools] quick-and-dirty tools to generate markdown list of taxonomies for misp-project.org --- tools/website-genlist.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tools/website-genlist.py diff --git a/tools/website-genlist.py b/tools/website-genlist.py new file mode 100644 index 0000000..ae5a46a --- /dev/null +++ b/tools/website-genlist.py @@ -0,0 +1,9 @@ +import json +import os +import re +filename = os.path.join("../", "MANIFEST.json") +with open(filename) as fp: + t = json.load(fp) + +for taxo in sorted(t['taxonomies'], key=lambda k: k['name']): + print ("[{}](https://github.com/MISP/misp-taxonomies/tree/master/{}):\n: {}[HTML](https://www.misp-project.org/taxonomies.html#_{})\n".format(taxo['name'], taxo['name'], taxo['description'], re.sub(r'_', '-',taxo['name'])))