Files
definitive-opensource/source/scripts/generation/mainheader_generator.py
2025-05-31 13:58:50 -07:00

27 lines
682 B
Python

import json
# Generates mainheader with dynamic project count
def generate_mainheader():
with open("source/data/applications.json", "r", encoding="utf-8") as f:
data = json.load(f)
project_count = len(data.get("applications", []))
header_content = f"""
<table align="center">
<tr>
<td>🇺🇦 v0.6.3-beta</td>
</tr>
</table>
<h1 align="center">[ definitive-opensource ] </h1>
<p align="center">The definitive list of the best of everything open source</p>
<p align="center"><code>Status: Active</code> - <code>Projects: {project_count}</code></p>
"""
return header_content
if __name__ == "__main__":
generate_mainheader()