import argparse
import sys

from clarabot_nano.common.i18n import install_default_l10n
from clarabot_nano.control.app import ControlApplication

install_default_l10n()


def startup():
    with ControlApplication.core_buffer() as core_buffer:
        return ControlApplication(core_buffer).OnRun()


def main():
    parser = argparse.ArgumentParser("Clarabot Nano - Control process (GUI)")
    args = parser.parse_args()
    sys.exit(startup())


if __name__ == "__main__":
    main()
