Skip to content

Commit

Permalink
bumped to nostr-sdk 0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
8go committed Dec 19, 2022
1 parent d028ea6 commit 669584d
Show file tree
Hide file tree
Showing 7 changed files with 243 additions and 61 deletions.
119 changes: 79 additions & 40 deletions Cargo.lock

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

4 changes: 2 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.1.0"
version = "0.1.1"
edition = "2021"
description = "simple but convenient CLI-based Nostr client app for publishing,sending and subscribing"
documentation = "https://docs.rs/nostr-commander"
Expand All @@ -19,7 +19,7 @@ publish = true

[dependencies]
anyhow = "1"
nostr-sdk = "0.7"
nostr-sdk = { version = "0.8", features = ["blocking", "all-nips", "nip04", "nip06"] }
tokio = { version = "1.23", features = ["full"] }
clap = { version = "4.0", features = ["derive", "color", "wrap_help", "unicode"] }
thiserror = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.1.1
35 changes: 35 additions & 0 deletions scripts/create-help-help-pre.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash

# Creates a file like this:
# <--usage>
# Print usage.
# <-h>, <--help>
# Print help.
# <--manual>
# Print manual.
# <-d>, <--debug>
# Print debug information.
# <--log-level> DEBUG|INFO|WARNING|ERROR|CRITICAL [DEBUG|INFO|WARNING|ERROR|CRITICAL]
# Set log level.
# <--verbose>
# Set verbosity.
# Always pairs of lines: header line, content line ...

PATH=".:./target/debug/nostr-commander-rs/:$PATH"
old_width=$(stty size | cut -d' ' -f2-)
stty cols 1000
nostr-commander-rs --manual | sed '1,/^options:/d' |
sed 's/^ //g' | sed '/^-/ s/ [ ]*/ \n /g' |
sed '/^You are running/,$d' |
sed -e :a -e '$!N;s/\(^ .*\)\n [ ]*/\1 /;ta' -e 'P;D' |
sed 's/^ [ ]*//g' | sed '/^$/d' | sed 's/\(.*\)Details::\(.*\)/\1/g' |
sed 's/[ \t]*$//' |
sed 's/\(^--[^ ]*\)\(.*\)/<\1>\2/g' |
sed 's/\(^-[a-z0-9]\)\(.*\)/<\1>\2/g' |
sed 's/\(^<-[^,]*\) \(--[^ ]+\)\(.*\)/\1<\2>\3/g' |
sed 's/\(^<-.*\)\(--[^ ]*\)\(.*\)/\1<\2>\3/g' >help.help.pre.txt

stty cols $old_width
stty size
echo -n "Max width: "
wc -L help.help.pre.txt
4 changes: 4 additions & 0 deletions scripts/create-help-help.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
PATH=".:./target/debug/nostr-commander-rs/:$PATH" &&
nostr-commander-rs --help >help.help.txt
echo "help.help.txt is $(wc -l help.help.txt | cut -d ' ' -f1) lines long"
Loading

0 comments on commit 669584d

Please sign in to comment.