Skip to content

Commit

Permalink
Merge pull request #54 from subalterngames/itch_changelog
Browse files Browse the repository at this point in the history
added a script to print an itch-formatted changelog
  • Loading branch information
subalterngames authored Jul 6, 2024
2 parents 7223870 + 747d81f commit e4cc7e6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions py/itch_changelog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from pathlib import Path
import re

version = re.search(r'\[workspace.package]\nversion = "(.*?)"$', Path("../Cargo.toml").read_text(), flags=re.MULTILINE).group(1)
changelog = re.search(f'## {version}' + r'((.|\n)*?)##', Path("../changelog.md").read_text(), flags=re.MULTILINE).group(1).strip()
itch = re.sub(r'- (.*?)$', r'<li>\1</li>', changelog, flags=re.MULTILINE)
print(f"<ul>\n{itch}\n</ul>")

0 comments on commit e4cc7e6

Please sign in to comment.