yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
extract_changelog.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2"""
3Extract changelog section for a specific version from docs/C1-changelog.md
4Usage: python3 extract_changelog.py <version>
5Example: python3 extract_changelog.py 0.3.0
6"""
7
8import re
9import sys
10import os
11
12def extract_version_changelog(version_num, changelog_file):
13 """Extract changelog section for specific version"""
14 try:
15 with open(changelog_file, 'r') as f:
16 content = f.read()
17
18 # Find the section for this version
19 version_pattern = rf"## {re.escape(version_num)}\s*\‍([^)]+\‍)"
20 next_version_pattern = r"## \d+\.\d+\.\d+\s*\‍([^)]+\‍)"
21
22 # Find start of current version section
23 version_match = re.search(version_pattern, content)
24 if not version_match:
25 return f"Changelog section not found for version {version_num}."
26
27 start_pos = version_match.end()
28
29 # Find start of next version section
30 remaining_content = content[start_pos:]
31 next_match = re.search(next_version_pattern, remaining_content)
32
33 if next_match:
34 end_pos = start_pos + next_match.start()
35 section_content = content[start_pos:end_pos].strip()
36 else:
37 section_content = remaining_content.strip()
38
39 return section_content
40
41 except Exception as e:
42 return f"Error reading changelog: {str(e)}"
43
44def main():
45 if len(sys.argv) != 2:
46 print("Usage: python3 extract_changelog.py <version>")
47 sys.exit(1)
48
49 version_num = sys.argv[1]
50 changelog_file = "docs/H1-changelog.md"
51
52 # Check if changelog file exists
53 if not os.path.exists(changelog_file):
54 print(f"Error: Changelog file {changelog_file} not found")
55 sys.exit(1)
56
57 # Extract changelog content
58 changelog_content = extract_version_changelog(version_num, changelog_file)
59
60 # Generate full release notes
61 release_notes = f"""# Yaze v{version_num} Release Notes
62
63{changelog_content}
64
65## Download Instructions
66
67### Windows
68- Download `yaze-windows-x64.zip`
69- Extract and run `yaze.exe`
70- Requires Windows 10 or later (64-bit)
71
72### macOS
73- Download `yaze-macos-universal.dmg` (Universal Binary - supports both Intel and Apple Silicon)
74- Mount the DMG and drag Yaze to Applications
75- On first launch, right-click the app and select "Open" to bypass Gatekeeper
76- Requires macOS 11.0 (Big Sur) or later
77
78### Linux
79- Download `yaze-linux-x64.tar.gz`
80- Extract: `tar -xzf yaze-linux-x64.tar.gz`
81- Run: `./yaze`
82- Requires Ubuntu 22.04 or equivalent with X11/Wayland
83
84## System Requirements
85- **Windows**: Windows 10 or later (64-bit only)
86- **macOS**: macOS 11.0 (Big Sur) or later (Universal Binary)
87- **Linux**: Ubuntu 22.04 or equivalent with X11 or Wayland
88
89## Support
90For issues and questions, please visit our [GitHub Issues](https://github.com/scawful/yaze/issues) page.
91"""
92
93 print(release_notes)
94
95if __name__ == "__main__":
96 main()
extract_version_changelog(version_num, changelog_file)