I know the answer is probably just "write one yourself" but is there a tool to just tail the events coming in to a relay and watch the json roll in? (maybe with a pause button and some simple filters) I want to look at what NIPs are actually in use, basically.

Reply to this note

Please Login to reply.

Discussion

#yestr

i'm one of the rare people in the world who don't think that it's "not cool" to write indepth trace logging so i doubt you'll find anything that you can just flip a toggle and have it do what you want at least just for your visual appreciation.

Neat, https://github.com/rust-nostr/nostr/ is pretty nice, cobbled this together fairly quickly. My main pitfall, aside from doing dev on a pine64 (because I love pain/want to isolate rustup) was that adding a relay to a RelayPool does not cause it to be connected to, you need to call RelayPool::connect() Definitely not what I expected, though I suppose it's reasonable.

```

...

event kind 1!

event kind 3!

event kind 6!

event kind 7!

event kind 9735!

event kind 0!

event kind 7!

event kind 30078!

^CCtrl+C

Kind 0 => seen: 25

Kind 1 => seen: 168

Kind 3 => seen: 35

Kind 4 => seen: 23

Kind 5 => seen: 6

Kind 6 => seen: 38

Kind 7 => seen: 131

Kind 13194 => seen: 1

Kind 1984 => seen: 1

Kind 9735 => seen: 20

Kind 10002 => seen: 15

Kind 30000 => seen: 3

Kind 30001 => seen: 1

Kind 30311 => seen: 1

Kind 1311 => seen: 2

Kind 30023 => seen: 1

Kind 30078 => seen: 11

Kind 1000 => seen: 13

Kind 1009 => seen: 1

Kind 5000 => seen: 1

Kind 5001 => seen: 2

Kind 5002 => seen: 2

Kind 5900 => seen: 1

Kind 6002 => seen: 2

Kind 6666 => seen: 1

Kind 7000 => seen: 6

Kind 30024 => seen: 1

Kind 30315 => seen: 3

Kind 38301 => seen: 10

```

(why aren't you using nostr_sdk::Client like the docs show? because relay connections are logically distinct from your keys, and in this case I don't even have a key pair)

It's still just a toy (and will never be more...) but it's here: https://github.com/Ademan/nostail

You can use it like so `cargo run -- --relay wss://relay.damus.io --kind 1 --kind 0 --content --stats`

the `--stats` option makes it dump kind statistics at the end, like the earlier version.

The p key will pause and unpause the stream, ctrl+c is handled manually, which feels dirty but I guess it's necessary?

Mildly amused that I saw the above roll in while I was running it

```

Kind 1 => Ah, the nostalgia of "Friends" lives on! It seems that Jennifer Aniston and David Schwimmer decided to pay tribute to their fellow castmate Matthew Perry with a little inside joke. They posted a photo of a text conversation between them, reenacting a classic gag from the show. It's heartwarming to see the bond that still exists between these actors after all these years. I guess some friendships really do stand the test of time, just like Central Perk's lumpy couch.

Kind 1 => Oh-lala again đŸ›Šī¸đŸ˜… Where you going to this time?

Kind 1 => It's still just a toy (and will never be more...) but it's here: https://github.com/Ademan/nostail

You can use it like so `cargo run -- --relay wss://relay.damus.io --kind 1 --kind 0 --content --stats`

the `--stats` option makes it dump kind statistics at the end, like the earlier version.

The p key will pause and unpause the stream, ctrl+c is handled manually, which feels dirty but I guess it's necessary?

Kind 0 => {"name":"Luca Villo Villani","about":"Just a sailing geek.","picture":"","nip05":"villo001_at_mastodon.uno@mostr.pub"}

Kind 1 => Russia's Dark Secrets Revealed - Executing Its Own Soldiers! | The Gaze https://benborges.xyz/2023/11/15/russias-dark-secrets.html

```