Listen to git commits for a specific repo and run a shell command

Pretty up some logs

vielle.dev 46e72bb1 1cc71075

verified
Changed files
+5 -2
src
+4
src/did.rs
··· 8 8 } 9 9 10 10 fn get_txt_did(handle: &String) -> Result<String, ()> { 11 + println!(" Trying dns TXT for _atproto.{}", handle); 11 12 // create a txt resolver 12 13 let resolver = match Resolver::new(ResolverConfig::default(), ResolverOpts::default()) { 13 14 Ok(val) => val, ··· 38 39 } 39 40 40 41 fn get_http_did(handle: &String) -> Result<String, ()> { 42 + println!(" Trying https for https://{}/.well-known/atproto-did", handle); 41 43 let res = 42 44 match reqwest::blocking::get("https://".to_owned() + handle + "/.well-known/atproto-did") { 43 45 Ok(val) => val, ··· 126 128 } 127 129 128 130 pub fn get_did(handle: String) -> Result<DidDoc, ()> { 131 + println!(" Getting DID for {}", handle); 129 132 let did = if let Ok(did) = get_txt_did(&handle) { 130 133 did 131 134 } else { ··· 136 139 } 137 140 }; 138 141 142 + println!(" Getting DID document for {}", did); 139 143 let did_doc = if did.starts_with("did:plc:") { 140 144 get_plc_doc(&did[8..]) 141 145 } else if did.starts_with("did:web:") {
+1 -2
src/main.rs
··· 10 10 return Err(()); 11 11 } 12 12 }; 13 - println!("{:#?}", config); 14 13 15 14 // resolve handle to did 15 + println!("Resolving {}", config.handle); 16 16 let did_doc = match did::get_did(config.handle) { 17 17 Ok(res) => res, 18 18 Err(_) => { ··· 20 20 return Err(()); 21 21 } 22 22 }; 23 - println!("{:#?}", did_doc); 24 23 // resolve did+repoName to knotserver 25 24 26 25 // connect to /events on knotserver