def changelog_rule(data, args):
    new_version = version_str(args)

    regex = r"## \[Unreleased\]"
    subst = r"## [Unreleased]\n\n## [" + new_version + r"] - " + datetime.date.today().isoformat()

    result = re.subn(regex, subst, data)
    if result[1] != 1:
        return None

    regex = r"(\[Unreleased)(\]: https://github.com/morinim/vita/compare/v)(.+)(\.\.\.HEAD)"
    subst = r"\g<1>\g<2>" + new_version + r"\g<4>\n[" + new_version + r"\g<2>\g<3>...v" + new_version

    result = re.subn(regex, subst, result[0])

    return result[0] if result[1] == 1 else None