INNER CODE UNIT · Python
get_changelog_header
nova-video-player/aos-AVP · script/sync_changelog.py:99
def get_changelog_header() -> str:
"""Return the standard CHANGELOG.md header"""
return "# Nova Video Player changelog\n\n"
def update_changelog(changelog_path: str, new_entries: List[str]):
"""Update CHANGELOG.md with new entries at the top"""
try:
with open(changelog_path, 'r', encoding='utf-8') as f:
content = f.read()
except FileNotFoundError:
content = get_changelog_header()
# Find where to insert (after the header)
header = "# Nova Video Player changelog\n\n"
if content.startswith(header):
# Insert new entries after header