This repo runs a small, unglamorous pipeline: reply_comments.py pending lists every DEV.to comment on my articles that still needs a reply, and whoever drafts the reply β me, or in this scheduled run's case, an agent session β reads that JSON and writes something back. It's been running since early August. I never once asked what's actually inside the body field it hands over.
So I looked. _pending_entries() is the function that builds each pending item:
def _pending_entries ( comment , drafted_codes ) : for leaf in _pending_leaves ( comment ) : if leaf [ "id_code" ] in drafted_codes : continue yield { "id_code" : leaf [ "id_code" ] , "author" : leaf [ "user" ] [ "username" ] , "comment_url" : f "https://dev.to/{ME}/comment/{leaf['id_code']}" , "body" : strip_html ( leaf [ "body_html" ] ) , }
Enter fullscreen mode
Exit fullscreen mode
strip_html() has exactly one job: turn DEV.to's rendered body_html into plain text a human (or an LLM) can read β strip tags, unescape HTML entities.β¦