[bisq-network/bisq] Redesign CLI help output (#1961)
Chris Beams
notifications at github.com
Sat Nov 24 12:40:00 UTC 2018
Prior to this pull request, Bisq's `--help` output looked like this:
$ bisq-desktop --help
Option Description
------ -----------
--appDataDir <String> Application data directory (default:
/Users/cbeams/Library/Application
Support/Bisq)
--appName <String> Application name (default: Bisq)
--banList <String> Nodes to exclude from network
connections. (default: )
--baseCurrencyNetwork <String> Base currency network (default:
BTC_MAINNET)
--bitcoinRegtestHost <RegTestHost> (default: LOCALHOST)
--btcNodes <String> Custom nodes used for BitcoinJ as
comma separated IP addresses.
(default: )
[...]
Now it reads as follows:
$ bisq-desktop --help
Bisq Desktop version 0.8.0
Usage: bisq-desktop [options]
Options:
--help
This help text
--logLevel=<OFF|ALL|ERROR|WARN|INFO|DEBUG|TRACE> (default: INFO)
Log level
--seedNodes=<host:port[,...]>
Override hard coded seed nodes as comma separated list e.g.
'rxdkppp3vicnbgqt.onion:8002,mfla72c4igh5ta2t.onion:8002'
--myAddress=<host:port>
My own onion address (used for bootstrap nodes to exclude itself)
--banList=<host:port[,...]>
Nodes to exclude from network connections.
--nodePort=<Integer> (default: 9999)
Port to listen on
--useLocalhostForP2P=<Boolean> (default: false)
Use localhost P2P network for development
[...]
This new help format is modeled after bitcoind's own help output, which reads as follows:
$ bitcoind --help | head -20
Bitcoin Core Daemon version v0.17.0.0-ge1ed37edaedc85b8c3468bd9a726046344036243
Usage: bitcoind [options] Start Bitcoin Core Daemon
Options:
-?
Print this help message and exit
-alertnotify=<cmd>
Execute command when a relevant alert is received or we see a really
long fork (%s in cmd is replaced by message)
-assumevalid=<hex>
If this block is in the chain assume that it and its ancestors are valid
and potentially skip their script verification (0 to verify all,
default:
0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8,
testnet:
0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75)
[...]
The goal is to maximize readibility, make best use of the available 80-character width and to present Bisq's command line interface in a way that is friendly and familiar to those well-versed in *nix idioms.
Reviewers, please look through the commits one-by-one and read the detailed commit comments, thanks.
You can view, comment on, or merge this pull request online at:
https://github.com/bisq-network/bisq/pull/1961
-- Commit Summary --
* Introduce BisqHelpFormatter
* Refactor option parsing configuration
* Include executable name and version in help output
-- File Changes --
M core/src/main/java/bisq/core/app/BisqExecutable.java (279)
M core/src/main/java/bisq/core/app/BisqHeadlessAppMain.java (5)
A core/src/main/java/bisq/core/app/BisqHelpFormatter.java (131)
M core/src/main/java/bisq/core/app/misc/ExecutableForAppWithP2p.java (4)
A core/src/test/java/bisq/core/app/BisqHelpFormatterTest.java (134)
A core/src/test/resources/bisq/core/app/cli-output.txt (57)
M desktop/src/main/java/bisq/desktop/app/BisqAppMain.java (5)
M monitor/src/main/java/bisq/monitor/MonitorMain.java (18)
M seednode/src/main/java/bisq/seednode/SeedNodeMain.java (4)
M statsnode/src/main/java/bisq/statistics/StatisticsMain.java (4)
-- Patch Links --
https://github.com/bisq-network/bisq/pull/1961.patch
https://github.com/bisq-network/bisq/pull/1961.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/1961
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20181124/b106d5d5/attachment.html>
More information about the bisq-github
mailing list