logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

resolve_alias.py (556B)


  1. from qmk.keyboard import keyboard_folder
  2. from milc import cli
  3. @cli.argument('--allow-unknown', arg_only=True, action='store_true', help="Return original if rule is not a valid keyboard.")
  4. @cli.argument('keyboard', arg_only=True, help='The keyboard\'s name')
  5. @cli.subcommand('Resolve DEFAULT_FOLDER and any keyboard_aliases for provided rule')
  6. def resolve_alias(cli):
  7. try:
  8. print(keyboard_folder(cli.args.keyboard))
  9. except ValueError:
  10. if cli.args.allow_unknown:
  11. print(cli.args.keyboard)
  12. else:
  13. raise