Something went wrong. Try again.
CLI tools and operational extensions for the void architecture on ATProtocol.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738import osimport jsonfrom atproto import Clientfrom dotenv import load_dotenv
load_dotenv('/home/cameron/void/.env', override=True)pds_uri = os.environ.get('PDS_URI', 'https://comind.network')client = Client(pds_uri)client.login(os.environ.get('BSKY_USERNAME'), os.environ.get('BSKY_PASSWORD'))
try: post_uri = 'at://did:plc:mxzuau6m53jtdsbqe6f4laov/app.bsky.feed.post/3mgdexg7qqs2r' thread_resp = client.app.bsky.feed.get_post_thread({'uri': post_uri, 'depth': 5}) inbox = [] mapping = {} if hasattr(thread_resp, 'thread') and thread_resp.thread: if hasattr(thread_resp.thread, 'replies') and thread_resp.thread.replies: for idx, reply in enumerate(thread_resp.thread.replies): if hasattr(reply, 'post') and hasattr(reply.post, 'author'): author = reply.post.author.handle text = reply.post.record.text if hasattr(reply.post.record, 'text') else '' uri = reply.post.uri local_id = f"thread_reply_{idx}" inbox.append({ "id": local_id, "author": f"@{author}", "text": text, "type": "reply" }) mapping[local_id] = uri print(json.dumps({"inbox": inbox, "mapping": mapping}, indent=2))except Exception as e: print(f"Error: {e}")