this repo has no description
0
fork

Configure Feed

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

tweaks

alice 0152e94e 2dbdd9b8

+6 -7
+2
.envrc
··· 1 + export VIRTUAL_ENV=.venv 2 + layout python
+4 -7
app.py
··· 18 18 retry_if_exception_type, 19 19 ) 20 20 21 - from atmst.cartool import print_all_records 21 + from atmst.cartool import get_posts_and_profiles 22 22 23 23 24 24 # Configure logging ··· 55 55 56 56 57 57 async def parse_car(car_file_path: str) -> str: 58 - records = print_all_records(car_file_path, True) 58 + records = get_posts_and_profiles(car_file_path) 59 59 for k, v in records.items(): 60 60 yield json.dumps({k: v}) + "\n" 61 61 ··· 106 106 107 107 @app.post("/fetch") 108 108 async def fetch_car_file(request: FetchRequest) -> str: 109 - did, pds = request.did, request.pds.strip().lower().rstrip("/") 110 - if pds.startswith("https://"): 111 - pds = pds[8:] 112 - elif pds.startswith("http://"): 113 - pds = pds[7:] 109 + did = request.did 110 + pds = request.pds.strip().lower().rstrip("/").removeprefix("https://").removeprefix("http://") 114 111 url = f"https://{pds}/xrpc/com.atproto.sync.getRepo?did={did}" 115 112 headers = { 116 113 "Accept": "application/vnd.ipld.car",