import json
from pathlib import Path
from generate_pdf import generate_political_pdf

job_dir = Path(r'c:\Users\sunde\proxmox\news-scan\output\20260612_131909')
articles = json.loads((job_dir / 'political_articles.json').read_text(encoding='utf-8'))
for a in articles:
    a['image_file'] = f"{a['id']}.png"

generate_political_pdf(articles, job_dir)
print("Regenerated PDF with images!")
