-
-
Save ericvolp12/2733424a79a28979d08a278c152ed52f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
websocat wss://jetstream.atproto.tools/subscribe | jq --unbuffered '.commit.collection | select( . != null )' | node -e 'console.clear();mv=0,c={},{log}=console,new readline.Interface({input:process.stdin}).on("line",e=>{u=c[e]=(c[e]||0)+1,mv=mv>u?mv:u;process.stdout.write("\033[H");Object.keys(c).sort((a,b)=>c[b]-c[a] || a.localeCompare(b)).forEach(k=>{v=c[k];log(`${k.padEnd(30)} ${"█".repeat(1+60*v/mv)} `.padEnd(100," ")+v)});log()})' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment