Skip to content

Commit

Permalink
added subscription filter options --limit-number, --limit-days, --lim…
Browse files Browse the repository at this point in the history
…it-hours, etc.
  • Loading branch information
8go committed Dec 14, 2022
1 parent e6ef452 commit c3d9d07
Show file tree
Hide file tree
Showing 7 changed files with 471 additions and 106 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
todo.txt

src.22*/*
src.20*/*
src.20*

test.txt

Expand Down
174 changes: 167 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[package]
name = "nostr-commander"
version = "0.0.7"
version = "0.0.8"
edition = "2021"
description = "simple but convenient CLI-based Nostr client app for publishing,sending and subscribing"
documentation = "https://docs.rs/nostr-commander"
Expand Down Expand Up @@ -30,7 +30,8 @@ tracing-subscriber = "0.3"
tracing = "0.1"
directories = "4.0"
update-informer = "0.5"
json = "0.12.4"
chrono = "0.4"
json = "0.12"


[dev-dependencies]
Expand Down
42 changes: 32 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,7 @@ you can copy and paste this config file to get going real fast.
"secret_key_bech32": "nsec1yljk9us0e3whjnzysu6pqjhnw5wglkr6hvx4vj376fs0sfaxze6qvx5f5x",
"public_key_bech32": "npub1af7ep6s5esrgtc2c7tlvd3v4jpna44qf6nhan8tek6h505nwrvgq38nwz6",
"relays": [
"wss://relay.nostr.info/",
"wss://nostr.ono.re/",
"wss://nostr.rocks/",
"wss://nostr-pub.wellorder.net/",
"wss://nostr.semisol.dev/",
"wss://nostr-relay.wlvs.space/"
"wss://nostr-pub.wellorder.net/"
],
"metadata": {
"name": "James Jones",
Expand All @@ -84,22 +79,22 @@ you can copy and paste this config file to get going real fast.
"contacts": [
{
"pk": "887645fef0ce0c3c1218d2f5d8e6132a19304cdc57cd20281d082f38cfea0072",
"relay_url": "wss://nostr.openchain.fr/",
"relay_url": "wss://nostr-pub.wellorder.net/",
"alias": "HackerNews"
},
{
"pk": "6b0d4c8d9dc59e110d380b0429a02891f1341a0fa2ba1b1cf83a3db4d47e3964",
"relay_url": "wss://nostr.openchain.fr/",
"relay_url": "wss://nostr-pub.wellorder.net/",
"alias": "dergigi"
},
{
"pk": "3235036bd0957dfb27ccda02d452d7c763be40c91a1ac082ba6983b25238388c",
"relay_url": "wss://nostr.openchain.fr/",
"relay_url": "wss://nostr-pub.wellorder.net/",
"alias": "vishalxl"
},
{
"pk": "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245",
"relay_url": "wss://nostr.openchain.fr/",
"relay_url": "wss://nostr-pub.wellorder.net/",
"alias": "jb55.com"
}
],
Expand Down Expand Up @@ -314,6 +309,33 @@ Options:
Subscribe to one or more public keys. Specify each public key in form
of 'npub1SomePublicKey'. Alternatively you can use the Hex form of
the private key
--limit-number <NUMBER>
Limit the number of messages to receive when subscribing. By default
there is no limit (0) [default: 0]
--limit-days <DAYS>
Limit the messages received to the last N days when subscribing. By
default there is no limit (0) [default: 0]
--limit-hours <HOURS>
Limit the messages received to the last N hours when subscribing. By
default there is no limit (0) [default: 0]
--limit-future-days <DAYS>
Limit the messages received to the next N days when subscribing. Stop
receiving N days in the future. By default there is no limit (0) [default:
0]
--limit-future-hours <HOURS>
Limit the messages received to the last N hours when subscribing.
Stop receiving N hours in the future. By default there is no limit
(0) [default: 0]
-h, --help
Print help information (use `--help` for more detail)
```

# Other Related Projects

- Look here for an [nostr awesome list](https://github.com/aljazceru/awesome-nostr).
- `nostr-commander` isn't quite what you wanted?
Check out [nostr_console](https://github.com/vishalxl/nostr_console).
- Not into `nostr` but into Matrix?
Check out [matrix-commander](https://github.com/8go/matrix-commander)
and [matrix-commander-rs](https://github.com/8go/matrix-commander-rs).
- Also [matrix-nostr-bridge](matrix-nostr-bridge).
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.7
0.0.8
Loading

0 comments on commit c3d9d07

Please sign in to comment.