aboutsummaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-05-09 14:53:18 +0100
committerGitHub <noreply@github.com>2021-05-09 15:53:18 +0200
commitf544b60aaa60eea3349eb5fbbae8ba3fd3c1b755 (patch)
treeab7d300630851ae2046fadd872d071d8e660691a /lib/python/qmk/cli
parent7725d813c9cf1a47863e325457b13a4542984eda (diff)
downloadqmk_firmware-f544b60aaa60eea3349eb5fbbae8ba3fd3c1b755.tar.gz
qmk_firmware-f544b60aaa60eea3349eb5fbbae8ba3fd3c1b755.zip
Align qmk info ascii logic with milc logging (#11627)
Diffstat (limited to 'lib/python/qmk/cli')
-rwxr-xr-xlib/python/qmk/cli/info.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/python/qmk/cli/info.py b/lib/python/qmk/cli/info.py
index 572b305ca..6115e8f87 100755
--- a/lib/python/qmk/cli/info.py
+++ b/lib/python/qmk/cli/info.py
@@ -2,8 +2,8 @@
2 2
3Compile an info.json for a particular keyboard and pretty-print it. 3Compile an info.json for a particular keyboard and pretty-print it.
4""" 4"""
5import sys
5import json 6import json
6import platform
7 7
8from milc import cli 8from milc import cli
9 9
@@ -15,7 +15,7 @@ from qmk.keymap import locate_keymap
15from qmk.info import info_json 15from qmk.info import info_json
16from qmk.path import is_keyboard 16from qmk.path import is_keyboard
17 17
18platform_id = platform.platform().lower() 18UNICODE_SUPPORT = sys.stdout.encoding.lower().startswith('utf')
19 19
20 20
21def show_keymap(kb_info_json, title_caps=True): 21def show_keymap(kb_info_json, title_caps=True):
@@ -129,7 +129,7 @@ def print_text_output(kb_info_json):
129@cli.argument('-l', '--layouts', action='store_true', help='Render the layouts.') 129@cli.argument('-l', '--layouts', action='store_true', help='Render the layouts.')
130@cli.argument('-m', '--matrix', action='store_true', help='Render the layouts with matrix information.') 130@cli.argument('-m', '--matrix', action='store_true', help='Render the layouts with matrix information.')
131@cli.argument('-f', '--format', default='friendly', arg_only=True, help='Format to display the data in (friendly, text, json) (Default: friendly).') 131@cli.argument('-f', '--format', default='friendly', arg_only=True, help='Format to display the data in (friendly, text, json) (Default: friendly).')
132@cli.argument('--ascii', action='store_true', default='windows' in platform_id, help='Render layout box drawings in ASCII only.') 132@cli.argument('--ascii', action='store_true', default=not UNICODE_SUPPORT, help='Render layout box drawings in ASCII only.')
133@cli.subcommand('Keyboard information.') 133@cli.subcommand('Keyboard information.')
134@automagic_keyboard 134@automagic_keyboard
135@automagic_keymap 135@automagic_keymap