gigq on Nostr: One liner using nostcat () and jq () to copy events from one relay to another. I’m ...
One liner using nostcat (
https://github.com/blakejakopovic/nostcat) and jq (
https://stedolan.github.io/jq/) to copy events from one relay to another. I’m using this to copy events from the people I follow to my own personal relay but you could also use it to broadcast your events to other public relays.
echo '["REQ", "CID", {"authors": ["219b82fd61787fb11b557cb6ba972ae475645bebd11a49b142819fe55bced64c"]]}]' | nostcat -u wss://relay.damus.io | jq -c 'del(.[1])' | nostcat --stream ws://localhost
Published at
2022-12-20 01:26:06Event JSON
{
"id": "80763f3c7abe46d94d7acd3f34941eaf46a35016a4f1c07cf8f58d715907a4bb",
"pubkey": "219b82fd61787fb11b557cb6ba972ae475645bebd11a49b142819fe55bced64c",
"created_at": 1671499566,
"kind": 1,
"tags": [],
"content": "One liner using nostcat (https://github.com/blakejakopovic/nostcat) and jq (https://stedolan.github.io/jq/) to copy events from one relay to another. I’m using this to copy events from the people I follow to my own personal relay but you could also use it to broadcast your events to other public relays.\n\necho '[\"REQ\", \"CID\", {\"authors\": [\"219b82fd61787fb11b557cb6ba972ae475645bebd11a49b142819fe55bced64c\"]]}]' | nostcat -u wss://relay.damus.io | jq -c 'del(.[1])' | nostcat --stream ws://localhost",
"sig": "8f6d6339ac347a76c83495ad056715e6dd4d42e18c7b2e894da06a0f87b64198b589add04bcb7f3aee0ebd9e16e0d79e99bd1c92a680612d84c9af275da079f6"
}