this repo has no description
0
fork

Configure Feed

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

tweaks

alice 86cf6a1d 7d67a22e

+13 -10
+13 -10
src/atmst/cartool.py
··· 49 49 print(f"{json.dumps(k)} -> {v.encode('base32')}") 50 50 51 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 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] = { 61 + "cid": v.encode(), 62 + "value": record 63 + } 64 + return data_dict 62 65 63 66 def list_all(car_path: str): 64 67 print_all_records(car_path, to_json=False)