#!/usr/bin/env python3
"""Lihat contoh caption sukses dari dump Repliz."""
import json
import sys

docs = json.load(open('/tmp/repliz_all_20260915.json'))
acc = sys.argv[1]
n = int(sys.argv[2]) if len(sys.argv) > 2 else 2
ds = [d for d in docs if d.get('accountId') == acc and d.get('status') == 'success']
ds.sort(key=lambda d: d.get('scheduleAt', ''))
for d in ds[-n:]:
    print("=" * 70)
    print(d.get('scheduleAt'), '|', d.get('type'), '|', (d.get('title') or '')[:70])
    print('-' * 70)
    print((d.get('description') or '')[:1400])
    print()
