Event Manipulation
Closed this issue · 3 comments
I have a nostr relay which is sort of a personal diary, so I can easily make a jsonl export or simply fetch all events.
I would like to run a find-replace over the content of all posts and then adjust the id appropriately, and then import them back into the relay (here rnostr
).
I am confident this is not a challenge with this tool, so I would appreciate hints on how to do that effectively.
You can pipe any event into nak event
then apply any flags modifying it. It will do exactly what you want.
Thank you so much! One little feature request is to re-sign an event even if no modification is requested, I think that is not supported yet.
My idea here is that I modify the content field of an event json, then pipe it to nak event --sec
and it resigns it - so if a key is given even without another flag, regenerate the event. Currently it is basically ignored then.
Why do you want to re-sign it? If it's not modified it will have the same id.