Comments (4)
I'm not against it. I was thinking more modular + composable, and how perhaps just piping to | sort -u
is good enough? Perhaps there are more complex de-duping or sorting use-cases that involve parsing the JSON events, which currently isn't done. I don't know how consistent nostr server's output the JSON keys (or perhaps drop keys, like special tags) for example - maybe this cannot be relied upon long term. Thoughts?
In testing, for example, it was nice to know that I actually received 30 events across servers (without --unique
, however it was 12 events with, and some servers returned the exact same as they must be replicating). Maybe not useful for others, outside of testing/debugging, but setting it as the default would kill that ability to compare.
from nostcat.
Now supported in v0.3.0. Updated examples in the README.md
Sort and unique results with multiple servers (dedupe)
$ echo '["REQ", "RAND", {"kinds": [1], "limit": 8}]' |
nostcat --unique wss://relay.damus.io wss://nostr.ono.re
Pipe events from one server to another (currently limited to 1 event at a time)
echo '["REQ", "CID", {"limit": 1}]' | nostcat wss://relay.damus.io |
jq -c 'del(.[1])' |
wss://nostr.ono.re
Let me know how it goes :) I am aware of a bad/failed to connect hang issue where there isn't a connection timeout for servers yet - but likely my next focus.
from nostcat.
should unique be the default? I can't imagine not using that flag.
from nostcat.
from nostcat.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nostcat.