#!/usr/bin/env python3 """Build Landvex site with all articles""" import json import glob from datetime import datetime # Hämta alla artiklar files = glob.glob('/home/bernt/.openclaw/workspace/projects/landvex/20-automation/intag/kandidatposter-2026-07-08*.json') all_articles = [] for f in files: with open(f) as fh: data = json.load(fh) all_articles.extend(data.get('kandidater', [])) print(f"Found {len(all_articles)} articles") # Bygg HTML html = f''' Landvex — Infrastructure Intelligence

Landvex

Infrastructure Intelligence — Global decisions, local insights

{len(all_articles)}
Articles
29
AAMOS Accounts
4
AI Agents

Latest Articles

''' # Lägg till artiklar for art in reversed(all_articles[-50:]): post = art.get('post', {}) namn = post.get('namn', {}) titel = namn.get('en', namn.get('sv', 'Untitled')) desc = post.get('identitet', {}).get('beskrivning', '')[:150] + '...' doman = post.get('doman', 'ANL') html += f'
{doman}
' html += f'
{titel}
' html += f'
{desc}
' html += f'
\n' html += f'''
''' with open('public/index.html', 'w') as f: f.write(html) print(f'✅ Site built with {len(all_articles)} articles')