mirror of
https://github.com/mustbeperfect/definitive-opensource.git
synced 2026-04-20 15:55:44 +02:00
Added comments and cleaned up python source code
This commit is contained in:
@@ -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 = []
|
||||
|
||||
|
||||
@@ -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"])
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user