mirror of
https://github.com/mustbeperfect/definitive-opensource.git
synced 2026-04-17 23:53:26 +02:00
Pointed script to new directory for data
This commit is contained in:
@@ -41,13 +41,13 @@ def format_stars(n):
|
||||
|
||||
def generate_contents(platform="all"):
|
||||
|
||||
with open("core/data/static/categories.json", "r", encoding="utf-8") as f:
|
||||
with open("../../data/static/categories.json", "r", encoding="utf-8") as f:
|
||||
cat_data = json.load(f)
|
||||
with open("core/data/dynamic/applications.json", "r", encoding="utf-8") as f:
|
||||
with open("../../data/dynamic/applications.json", "r", encoding="utf-8") as f:
|
||||
app_data = json.load(f)
|
||||
with open("core/data/static/tags.json", "r", encoding="utf-8") as f:
|
||||
with open("../../data/static/tags.json", "r", encoding="utf-8") as f:
|
||||
tags_data = json.load(f)
|
||||
with open("core/data/static/platforms.json", "r", encoding="utf-8") as f:
|
||||
with open("../../data/static/platforms.json", "r", encoding="utf-8") as f:
|
||||
platforms_data = json.load(f)
|
||||
|
||||
categories = cat_data.get("categories", [])
|
||||
|
||||
@@ -2,7 +2,7 @@ import json
|
||||
|
||||
# Generates mainheader with dynamic project count
|
||||
def generate_mainheader():
|
||||
with open("core/data/dynamic/applications.json", "r", encoding="utf-8") as f:
|
||||
with open("../../data/dynamic/applications.json", "r", encoding="utf-8") as f:
|
||||
data = json.load(f)
|
||||
|
||||
project_count = len(data.get("applications", []))
|
||||
|
||||
Reference in New Issue
Block a user