"""Print recent own posts of given accounts so I can judge them by eye. Writes eyeball/.txt.""" import importlib.util, sys, time from pathlib import Path sp = importlib.util.spec_from_file_location("core", Path(__file__).with_name("bsky_public.py")) core = importlib.util.module_from_spec(sp); sp.loader.exec_module(core) d = Path(__file__).parent / "eyeball"; d.mkdir(exist_ok=True) for h in sys.argv[1:]: feed = core._pub("app.bsky.feed.getAuthorFeed", f"actor={h}&limit=25&filter=posts_with_replies").get("feed", []) lines = [] for it in feed: p = it["post"] if it.get("reason") or p["author"]["handle"] != h: continue r = p["record"] lines.append(f"{r['createdAt'][:16]} {'RE ' if r.get('reply') else ' '}{r.get('text','')[:150]!r}") (d / f"{h}.txt").write_text("\n".join(lines), encoding="utf-8") print(f"===== @{h}"); print("\n".join(lines[:9])); time.sleep(0.5)