Skip to content

Commit 01aec32

Browse files
committed
generator: change --verbose to --show
1 parent cd0d914 commit 01aec32

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

generator-web/make_zip_bundle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@
6262
}
6363

6464
$layout_out = array();
65-
$layout_command = "python3 -m generator --keyboard ".$filepath_xml." -v layout";
65+
$layout_command = "python3 -m generator --keyboard ".$filepath_xml." --show layout";
6666
exec($layout_command, $layout_out, $result_code);
6767
$layout = join("\n", $layout_out);
6868
if($result_code != 0) { $ERRORS[] = "Error Layout\n"; }
6969

7070
$layout = preg_replace("/".preg_quote($VERSION0)."/", $VERSION, $layout);
7171

7272
$keycodes_out = array();
73-
$keycodes_command = "python3 -m generator --keyboard ".$filepath_xml." -v keycode";
73+
$keycodes_command = "python3 -m generator --keyboard ".$filepath_xml." --show keycode";
7474
exec($keycodes_command, $keycodes_out, $result_code);
7575
$keycodes = join("\n", $keycodes_out);
7676
if($result_code != 0) { $ERRORS[] = "Error Keycodes\n"; }

generator/layout_generator.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -522,8 +522,8 @@ def output_keycode_file(output_file, output_file_data):
522522
@click.option("--output-layout", default="")
523523
@click.option("--output-keycode", default="")
524524
@click.option("--debug", "-d", type=click.INT, default=1)
525-
@click.option("--verbose", "-v", default="")
526-
def main(keyboard, lang, platform, output, output_layout, output_keycode, debug, verbose):
525+
@click.option("--show", "-s", default="")
526+
def main(keyboard, lang, platform, output, output_layout, output_keycode, debug, show):
527527
global DEBUG_LEVEL
528528
DEBUG_LEVEL = debug
529529
echo(">", keyboard, fg="green")
@@ -561,9 +561,12 @@ def main(keyboard, lang, platform, output, output_layout, output_keycode, debug,
561561
output_layout = os.path.join(
562562
BUILD_DIR, f"keyboard_layout_{platform.lower()}_{lang.lower()}.py"
563563
)
564-
echo(f"Write to {output_layout}", fg="cyan")
564+
if not show:
565+
echoE(f"Write to {output_layout}", fg="cyan")
566+
else:
567+
echo(f"Write to {output_layout}", fg="cyan")
565568
output_layout_file(output_layout, data_layout)
566-
if verbose == "layout" or verbose == "v":
569+
if show == "layout" or show == "s":
567570
print(data_layout)
568571

569572
data_keycode = make_keycode_file(layout_data)
@@ -573,9 +576,12 @@ def main(keyboard, lang, platform, output, output_layout, output_keycode, debug,
573576
output_keycode = os.path.join(
574577
BUILD_DIR, f"keycode_{platform.lower()}_{lang.lower()}.py"
575578
)
576-
echo(f"Write to {output_keycode}", fg="cyan")
579+
if not show:
580+
echoE(f"Write to {output_keycode}", fg="cyan")
581+
else:
582+
echo(f"Write to {output_keycode}", fg="cyan")
577583
output_keycode_file(output_keycode, data_keycode)
578-
if verbose == "keycode" or verbose == "v":
584+
if show == "keycode" or show == "s":
579585
print(data_keycode)
580586

581587
if __name__ == "__main__":

0 commit comments

Comments
 (0)