mirror of
https://github.com/Ujwal223/FocusGram.git
synced 2026-06-02 12:01:34 +02:00
8 lines
284 B
Python
8 lines
284 B
Python
from pathlib import Path
|
|
import re
|
|
|
|
text = Path("CHANGELOG.md").read_text(encoding="utf-8")
|
|
m = re.search(r"^##\s+FocusGram\s+([0-9]+\.[0-9]+\.[0-9]+)\s*$", text, re.M)
|
|
if not m:
|
|
raise SystemExit("Could not find a top changelog heading like: ## FocusGram 2.0.0")
|
|
print(m.group(1)) |