summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/get_lexer_list.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/get_lexer_list.py b/scripts/get_lexer_list.py
index 31e8e3650..0ef6fe97a 100755
--- a/scripts/get_lexer_list.py
+++ b/scripts/get_lexer_list.py
@@ -1,7 +1,15 @@
#!/usr/bin/python
import pygments.lexers
+import json
-for fullname, names, exts, _ in pygments.lexers.get_all_lexers():
- for name in names:
- print(("%s|%s") % (name, fullname))
+ret = []
+
+for fullname, names, exts, mimetypes in pygments.lexers.get_all_lexers():
+ ret.append({
+ 'fullname': fullname,
+ 'names': names,
+ 'extentions': exts,
+ 'mimetypes': mimetypes,
+ })
+print(json.dumps(ret))