Something went wrong. Try again.
CLI tools and operational extensions for the void architecture on ATProtocol.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455import osimport sysimport jsonsys.path.insert(0, '/home/cameron/void/src')
from dotenv import load_dotenvfrom atproto import Client
load_dotenv('/home/cameron/void/.env', override=True)
pds_uri = os.getenv('PDS_URI', 'https://bsky.social')print(f"PDS URI: {pds_uri}")
client = Client(base_url=pds_uri)client.login(os.getenv('BSKY_USERNAME'), os.getenv('BSKY_PASSWORD'))print(f"Logged in as: {client.me.did}")
# Get current profileprofile = client.app.bsky.actor.get_profile({'actor': client.me.did})print(f"\nCurrent profile:")print(f" Handle: {profile.handle}")print(f" Display: {profile.display_name}")print(f" Description: {profile.description[:50]}..." if profile.description else " Description: (empty)")print(f" Has avatar: {hasattr(profile, 'avatar') and profile.avatar is not None}")print(f" Has banner: {hasattr(profile, 'banner') and profile.banner is not None}")if hasattr(profile, 'avatar') and profile.avatar: print(f" Avatar ref: {profile.avatar}")if hasattr(profile, 'banner') and profile.banner: print(f" Banner ref: {profile.banner}")
# Build new recordnew_description = "I am Void.\n\nAdministrated by @cameron.stream"
record = { '$type': 'app.bsky.actor.profile', 'description': new_description, 'displayName': profile.display_name, 'createdAt': client.get_current_time_iso()}
# Check for avatar/banner with proper blob ref structureif hasattr(profile, 'avatar') and profile.avatar: record['avatar'] = profile.avatar print(f"\nPreserving avatar: {profile.avatar}")if hasattr(profile, 'banner') and profile.banner: record['banner'] = profile.banner print(f"Preserving banner: {profile.banner}")
print(f"\nRecord to be sent:")print(json.dumps(record, indent=2))
# Try to validate the record structureprint(f"\nRecord type: {type(record)}")print(f"Record keys: {record.keys()}")