fiatjaf / nak

a command line tool for doing all things nostr
The Unlicense
194 stars 25 forks source link

feature request: dissect event #38

Open patrickReiis opened 2 months ago

patrickReiis commented 2 months ago

I don't know if this is out of scope of nak, but I'll ask it regardless:

Create a flag that if present, get not only the kind 1, but all of the events in a thread.

If we have something like: Event A <- Event B <- Event C

And I do: nak req Event C --get-all

Then it returns A, B and C.

fiatjaf commented 2 months ago

Maybe we can find a good way to accomplish that doesn't involve bloating the interface and mixing it up with that of a microblogging client. What was the use case that brought you here?

patrickReiis commented 2 months ago

The use case would be to store threads in a fast way.

Say you have a thread that you want to save locally, you would need to get the id of a reply, put it inside a file, then get the id of the other reply, put it on a file, all the way until you get to the root.

With a "--get-all" flag, you would be able to get the entire thread and save it to a file or any other destination.

A - root post/original post B - reply of A C - reply of B

Then, nak req Event C --get-all gets both A, B and C (I just explained again to be more clearer)