-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
8go
committed
Dec 19, 2022
1 parent
d028ea6
commit 669584d
Showing
7 changed files
with
243 additions
and
61 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.1.0 | ||
0.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
Oops, something went wrong.