def main():
    # All scripts should have their current work dir set to project root
    if os.path.basename(os.getcwd()) == 'script':
        os.chdir('..')

    print("materialdesignicons.com icon updater")

    local_version = get_local_version()

    # The remote version is not reliable.
    _, remote_url = get_remote_version()

    source = clean_component(requests.get(remote_url).text)
    new_version = hashlib.md5(source.encode('utf-8')).hexdigest()

    if local_version == new_version:
        print('Already on the latest version.')
        sys.exit()

    write_component(new_version, source)
    print('Updated to latest version')
Main section of the script.
dataset/ETHPy150Open home-assistant/home-assistant/script/update_mdi.py/main