def new_result(title, subtitle, argument, valid=True, icon=None):
    """
    Generate a singe Alfred result from an input
    """
    result = {
        "type": "file",
        "title": title,
        "subtitle": subtitle,
        "arg": argument,
        "valid": valid
    }
    if icon is not None:
        result["icon"] = {"path": icon}
    return result