From 1c68c76437698c1217d1d1832636364d941238c9 Mon Sep 17 00:00:00 2001 From: Nathan Falvey Date: Sat, 28 Feb 2026 13:48:27 +0000 Subject: [PATCH] Enhance README generation with improved user display and stats summary; format languages used section --- update_profile.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/update_profile.py b/update_profile.py index 60e0d87..3947395 100644 --- a/update_profile.py +++ b/update_profile.py @@ -66,17 +66,21 @@ def do_readme_parse(): data = collect_gitea_data() # does all the API calls and collects the data into a structured format, collected once to avoid multiple API calls during the README build process, this data will be used to populate the README template with the relevant information about the Gitea instance and the user's repositories. storage_used = sum(repo["size"] for repo in data["repos"]) languages_used = set(repo["language"] for repo in data["repos"] if repo["language"] != "N/A") + username = data["username"].capitalize() if data["username"] else "Unknown User" - md = f"# {data['username']}' Developer Hub\n\n" - md += f"## Welcome to {data['username']}'s Gitea Developer Hub! This is a collection of repositories and projects that I have created and maintained on my Gitea instance. Here you can find various projects that I have worked on, ranging from personal projects to open-source contributions.\n\n" + md = f"# {username}'s Developer Hub\n\n" + md += f"## Welcome to {username}'s Gitea Developer Hub! This is a collection of repositories and projects that I have created and maintained on my Gitea instance. Here you can find various projects that I have worked on, ranging from personal projects to open-source contributions.\n\n" if data["repos"]: md += f"### 📂 Repository Breakdown\n\n" for repo in data["repos"]: md += f"- [{repo['name']}]({GITEA_URL}/{USERNAME}/{repo['name']}) - {repo['language']}\n" + md += "## 📊 Stats Summary\n" md += f"\n**Total Repositories:** {len(data['repos'])}\n\n" md += f"**Total Storage Used:** {format_bytes(storage_used)}\n\n" if languages_used: - md += f"**Languages Used:** {', '.join(languages_used)}\n\n" + md += f"### **Languages Used:**" + for lang in languages_used: + md += f"- **{lang}**\n" md += "\n"