Added comments and cleaned up python source code

This commit is contained in:
Lucas
2026-01-12 11:35:59 -08:00
parent e3868dbdad
commit 119f95a492
5 changed files with 17 additions and 19 deletions

View File

@@ -14,6 +14,7 @@ with open("core/data/static/platforms.json") as f:
seen_github = set()
issues_report = []
# Check for formatting issues inside of all data files (static and dynamic)
for app in applications:
app_issues = []

View File

@@ -1,8 +1,9 @@
import os
import requests
import json
import os
from datetime import datetime
import requests
with open("core/data/dynamic/applications.json", "r") as f:
data = json.load(f)
@@ -14,6 +15,7 @@ headers = {
}
# Update stats of all projects by contacting GitHub API
def update_application_data(app):
repo_name = app["repo_url"].split("github.com/")[1]
@@ -30,6 +32,7 @@ def update_application_data(app):
app["stars"] = repo_data.get("stargazers_count", app["stars"])
app["language"] = repo_data.get("language", app["language"])
# Check for flags to prevent update of specific stats
if "custom-homepage" not in app.get("flags", []):
app["homepage_url"] = repo_data.get("homepage", app["homepage_url"])

View File

@@ -1,8 +1,9 @@
import os
import requests
import json
import os
from datetime import datetime, timedelta
import requests
INPUT_FILE = "core/data/dynamic/applications.json"
OUTPUT_FILE = "resources/maintenance/status_maintenance.md"
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN")
@@ -18,6 +19,7 @@ potentially_abandoned = []
archived = []
no_longer_exists = []
# Check if projects are abandoned, archived, or no longer exist
for app in data.get("applications", []):
repo_url = app.get("repo_url")
if not repo_url or "github.com" not in repo_url: