cli
This module generates rivalcfg’s CLI.
- class rivalcfg.cli.PrintDebugAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None, deprecated=False)
Prints debug information and exit.
- class rivalcfg.cli.PrintSupportedDevicesAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None, deprecated=False)
Print supported devices and exit.
- class rivalcfg.cli.PrintUdevRulesAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None, deprecated=False)
Prints udev rules and exit.
- class rivalcfg.cli.UpdateUdevRulesAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None, deprecated=False)
Updates udev rules and exit.
- rivalcfg.cli.add_main_cli(cli_parser)
Adds the main CLI options.
- Parameters:
cli_parser (ArgumentParser) – An
ArgumentParser
instance.
- rivalcfg.cli.add_mouse_cli(cli_parser, mouse_profile)
Adds the CLI options for the given mouse profile.
- Parameters:
cli_parser (ArgumentParser) – An
ArgumentParser
instance.mouse_profile – One of the rivalcfg mouse profile (provided by
rivalcfg.devices.get_profile()
).
- rivalcfg.cli.normalize_cli_option_name(name)
Helper function to transform a setting name to a cli option.
- Parameters:
name (str) – The setting name.
- Return type:
str
>>> normalize_cli_option_name("My_Test_Setting1") 'my-test-setting1'