#!/usr/bin/python3

import argparse

from keyman_config import add_standard_arguments, initialize_logging, initialize_sentry, verify_dbus_running
from keyman_config.uninstall_kmp import uninstall_kmp

def main():
    parser = argparse.ArgumentParser(description='Uninstall a Keyman keyboard package.')
    parser.add_argument('id', help='Keyman keyboard id')
    parser.add_argument('-s', '--shared', action='store_true', help='Uninstall from shared area /usr/local')
    add_standard_arguments(parser)

    args = parser.parse_args()

    initialize_logging(args)
    initialize_sentry()
    verify_dbus_running()

    uninstall_kmp(args.id, args.shared)


if __name__ == "__main__":
    main()
