Files
MineGeo/format_report_md.py
pavel444-byte 658c8974ac
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 6m26s
Release v0.1.4 with terrain rescanning and owner-published map updates
2026-10-28 19:40:53 +05:00

17 lines
659 B
Python

from pathlib import Path
p = Path('MineGeo community report.txt')
parts = p.read_text(encoding='utf-8').split('\n\n')
headings = {'Changes made', 'Recommended next steps', 'Scope and limitations'}
out = []
in_recommendations = False
for i, part in enumerate(parts):
part = part.strip()
if not part: continue
if i == 0: out.append('# ' + part)
elif part in headings:
in_recommendations = part == 'Recommended next steps'
out.append('## ' + part)
elif in_recommendations: out.append('- ' + part)
else: out.append(part)
Path('MineGeo community improvement report.md').write_text('\n\n'.join(out) + '\n', encoding='utf-8')