def main():
    # Exit if run from the interpreter
    # if not sys.argv[0]:
    #    sys.exit(1)

    _init_loggers()

    args = settings.get_args()
    # if args.compact and not args.list_channels:
    #    logger.info("--compact is only used with --list-channels")
    if args.list_categories:
        config_util.list_categories()
    elif args.list_channels:
        config_util.list_channels(compact=args.compact)
    elif args.log:
        print(command_util.download_log(full=args.full))
    elif args.clear_cache:
        command_util.clear_cache()
    elif args.version:
        print(get_iplayer_downloader.PROGRAM_NAME, get_iplayer_downloader.VERSION)
    else:
        from get_iplayer_downloader.ui.main_window import main

        main()
def main():
    # Exit if run from the interpreter
    #if not sys.argv[0]:
    #    sys.exit(1)

    _init_loggers()

    args = settings.get_args()
    #if args.compact and not args.list_channels:
    #    logger.info("--compact is only used with --list-channels")
    if args.list_categories:
        config_util.list_categories()
    elif args.list_channels:
        config_util.list_channels(compact=args.compact)
    elif args.log:
        print(command_util.download_log(full=args.full))
    elif args.clear_cache:
        command_util.clear_cache()
    elif args.version:
        print(get_iplayer_downloader.PROGRAM_NAME,
              get_iplayer_downloader.VERSION)
    else:
        from get_iplayer_downloader.ui.main_window import main
        main()

def main():
    # Exit if run from the interpreter
    # if not sys.argv[0]:
    #    sys.exit(1)

    _init_loggers()

    args = settings.get_args()
    # if args.compact and not args.list_channels:
    #    logger.info("--compact is only used with --list-channels")
    if args.list_categories:
        config_util.list_categories()
    elif args.list_channels:
        config_util.list_channels(compact=args.compact)
    elif args.log:
        print(command_util.download_log(full=args.full))
    elif args.clear_cache:
        command_util.clear_cache()
    elif args.version:
        print(get_iplayer_downloader.PROGRAM_NAME, get_iplayer_downloader.VERSION)
    else:
        from get_iplayer_downloader.ui.main_window import main

        main()


if __name__ == "__main__":
    main()

def main():
    # Exit if run from the interpreter
    #if not sys.argv[0]:
    #    sys.exit(1)

    _init_loggers()

    args = settings.get_args()
    #if args.compact and not args.list_channels:
    #    logger.info("--compact is only used with --list-channels")
    if args.list_categories:
        config_util.list_categories()
    elif args.list_channels:
        config_util.list_channels(compact=args.compact)
    elif args.log:
        print(command_util.download_log(full=args.full))
    elif args.clear_cache:
        command_util.clear_cache()
    elif args.version:
        print(get_iplayer_downloader.PROGRAM_NAME,
              get_iplayer_downloader.VERSION)
    else:
        from get_iplayer_downloader.ui.main_window import main
        main()


if __name__ == "__main__":
    main()