diff options
Diffstat (limited to 'scripts/langmatrix.py')
| -rwxr-xr-x | scripts/langmatrix.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/langmatrix.py b/scripts/langmatrix.py new file mode 100755 index 0000000..357ddea --- /dev/null +++ b/scripts/langmatrix.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 +"""A matrix! Of languages!""" +import nikola.nikola + +keys = ['LUXON_LOCALES', 'MOMENTJS_LOCALES', 'PYPHEN_LOCALES', 'DOCUTILS_LOCALES'] +keys_short = ['language', 'luxon', 'moment', 'pyphen', 'docutils'] +print('\t'.join(keys_short)) + +for tr in nikola.nikola.LEGAL_VALUES['TRANSLATIONS']: + if isinstance(tr, tuple): + tr = tr[0] + out = tr + if len(out) < 8: + out += '\t' + for key in keys: + out += '\t' + out += '\x1b[37;42;1m+' if tr in nikola.nikola.LEGAL_VALUES[key] else '\x1b[37;41;1m-' + print(out + '\t\x1b[0m') + +print('\t'.join(keys_short)) |
