Align qmk info ascii logic with milc logging (#11627)
This commit is contained in:
parent
7725d813c9
commit
f544b60aaa
1 changed files with 3 additions and 3 deletions
|
@ -2,8 +2,8 @@
|
|||
|
||||
Compile an info.json for a particular keyboard and pretty-print it.
|
||||
"""
|
||||
import sys
|
||||
import json
|
||||
import platform
|
||||
|
||||
from milc import cli
|
||||
|
||||
|
@ -15,7 +15,7 @@ from qmk.keymap import locate_keymap
|
|||
from qmk.info import info_json
|
||||
from qmk.path import is_keyboard
|
||||
|
||||
platform_id = platform.platform().lower()
|
||||
UNICODE_SUPPORT = sys.stdout.encoding.lower().startswith('utf')
|
||||
|
||||
|
||||
def show_keymap(kb_info_json, title_caps=True):
|
||||
|
@ -129,7 +129,7 @@ def print_text_output(kb_info_json):
|
|||
@cli.argument('-l', '--layouts', action='store_true', help='Render the layouts.')
|
||||
@cli.argument('-m', '--matrix', action='store_true', help='Render the layouts with matrix information.')
|
||||
@cli.argument('-f', '--format', default='friendly', arg_only=True, help='Format to display the data in (friendly, text, json) (Default: friendly).')
|
||||
@cli.argument('--ascii', action='store_true', default='windows' in platform_id, help='Render layout box drawings in ASCII only.')
|
||||
@cli.argument('--ascii', action='store_true', default=not UNICODE_SUPPORT, help='Render layout box drawings in ASCII only.')
|
||||
@cli.subcommand('Keyboard information.')
|
||||
@automagic_keyboard
|
||||
@automagic_keymap
|
||||
|
|
Loading…
Reference in a new issue