XR for Universal Blue and Fedora Atomic Desktops
vr fedora-atomic linux
4
fork

Configure Feed

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

debug: easily preview data before sending

Signed-off-by: Shiloh Fen <shiloh@shilohfen.com>

matrixfurry.com 025129d2 2f1ae8ab

verified
+24 -10
+24 -10
src/atomic-xr/_debug.nu
··· 9 9 --full (-f) # Include extra debug information 10 10 ] { 11 11 let output = $output | default (mktemp -t --suffix .msgpackz) | path expand 12 - log info "This function produces a brotli-compressed msgpack debug file." 13 12 14 - if $base64 { 15 - log info $"If you'd like to check what information it contains, use `nu -c '{base64} | decode base64 | from msgpackz'`" 16 - } else { 17 - log info $"If you'd like to check what information it contains, use `nu -c 'open ($output) | from msgpackz'`" 18 - } 19 - 20 - log info "" 21 - log info "Creating debug file..." 13 + log info "Gathering debug information" 22 14 23 15 let flatpak_installed = flatpak list --columns application | lines 24 16 let sys = if $full { ··· 97 89 } 98 90 | to msgpackz 99 91 | if $base64 { 100 - encode base64 92 + print (ansi cyan) 93 + $in | encode base64 | print 94 + print (ansi reset) 101 95 } else { 102 96 save -f $output 103 97 log info $"Successfully created debug file. It has been saved to ($output)" 104 98 } 99 + 100 + if $base64 { 101 + log info $"If you'd like to check what info that contains, use `axr '_debug decode --base64 {base64}'`" 102 + } else { 103 + log info $"If you'd like to check what info it contains, use `axr _debug decode ($output)`" 104 + } 105 + } 106 + 107 + export def decode [ 108 + input # Base64 or file to decode 109 + --base64 110 + --explore (-e) # Explore output 111 + ] { 112 + if $base64 { 113 + $input | decode base64 114 + } else { 115 + open $input 116 + } 117 + | from msgpackz 118 + | if $explore {explore} else {$in} 105 119 }