def METHOD_NAME(ctx, recipes_file, account_recipes, public_recipes):
    if account_recipes:
        user = sb.User.retrieve()
        click.echo("Exporting recipes for account {} to {}."
                   .format(user['account']['id'], recipes_file))
        sr.export_recipes_to_yaml(sr.get_account_recipes(user), recipes_file)
        click.echo("Recipes successfully exported!")
    elif public_recipes:
        click.echo("Exporting all public recipes to {}.".format(recipes_file))
        sr.export_recipes_to_yaml(sr.get_public_recipes(), recipes_file)
        click.echo("Recipes successfully exported!")
    else:
        ctx.fail("Export mode should be used with --account-recipes or --public-recipes!")
    return