mount an atproto PDS repository as a FUSE filesystem oppi.li/posts/mounting_the_atmosphere/

Pretty-print JSON #17

merged opened by danabra.mov targeting main

This is easier to browse and should make it more powerful for agent exploration since they can rely on newlines when grepping etc

Labels

None yet.

Participants 2
AT URI
at://did:plc:fpruhuo22xkm5o7ttr2ktxdo/sh.tangled.repo.pull/3mcseinomdy22
+1 -1
Diff #0
+1 -1
src/fs.rs
··· 473 473 let mut repos = self.repos.lock().unwrap(); 474 474 let repo = &mut repos[&did]; 475 475 if let Ok(Some(val)) = self.rt.block_on(repo.get_raw::<ipld_core::ipld::Ipld>(&key)) { 476 - reply.data(&serde_json::to_string(&val).unwrap().as_bytes()[offset as usize..]); 476 + reply.data(&serde_json::to_string_pretty(&val).unwrap().as_bytes()[offset as usize..]); 477 477 return; 478 478 } 479 479 } else {

History

1 round 1 comment
sign up or login to add to the discussion
danabra.mov submitted #0
expand 1 comment

interesting, this was done first in this PR (by you!), but subsequently undone in this commit.

pull request successfully merged