this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add get_posts_and_profiles

alice 7d67a22e 401f38cf

+12
+12
src/atmst/cartool.py
··· 48 48 else: 49 49 print(f"{json.dumps(k)} -> {v.encode('base32')}") 50 50 51 + def get_posts_and_profiles(car_path: str): 52 + bs, commit = open_car(car_path) 53 + data_dict = {} 54 + for path in ["app.bsky.feed.post/", "app.bsky.actor.profile/"]: 55 + for k, v in NodeWalker(NodeStore(bs), commit["data"]).iter_kv_range( 56 + path, path + NodeWalker.PATH_MAX 57 + ): 58 + record = decode_dag_cbor(bs.get_block(bytes(v)), atjson_mode=True) 59 + record["cid"] = v.encode() 60 + data_dict[k] = record 61 + return data_dict 62 + 51 63 def list_all(car_path: str): 52 64 print_all_records(car_path, to_json=False) 53 65