diff --git a/scripts/build-hub.py b/scripts/build-hub.py index da4ce8c..f2f7b3c 100644 --- a/scripts/build-hub.py +++ b/scripts/build-hub.py @@ -3,6 +3,7 @@ from __future__ import annotations +import hashlib import html import json import sys @@ -17,7 +18,7 @@ def esc(value: str) -> str: return html.escape(value, quote=True) -def page(slug: str, title: str, description: str, content: str, script: str = "") -> str: +def page(slug: str, title: str, description: str, content: str, social_image: str, script: str = "") -> str: if slug == "observatory": content = content.replace('
{label}' for key, label in NAV) @@ -52,11 +53,17 @@ def page(slug: str, title: str, description: str, content: str, script: str = "" - + + + + + + + @@ -121,11 +128,11 @@ def atlas(data: dict) -> str: for i, entry in enumerate(data["entries"], 1): tags = "".join(f'{esc(tag)}' for tag in entry["tags"][:3]) cards.append(f'''
-
{i:02d}{esc(labels[entry['category']])}
-

{esc(entry['name'])}

{esc(entry['summary'])}

-
A starting point for

{esc(entry['use_case'])}

{esc(entry['license'])}
-
Explore {esc(entry['name'])}Official reference ↗
-
''') +
{i:02d}{esc(labels[entry['category']])}
+

{esc(entry['name'])}

{esc(entry['summary'])}

+
A starting point for

{esc(entry['use_case'])}

{esc(entry['license'])}
+
Explore {esc(entry['name'])}Official reference ↗
+''') return heading("01", "Agent Atlas", 'Many paths.
Find yours.', "An independent map of the open agent ecosystem. Pick a starting point for your next idea — whatever model, machine or background you bring.") + f'''
{len(data['entries'])} curated entriesSources checked Read as JSON ↗