From d57a8bd3c7be5fdf3282d6d45c8dea1d50f3fac1 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Sat, 5 Sep 2020 04:30:13 +0200 Subject: Improve AsciiDoc compatibility I need two renderers to work: hswg/libasciidoc and asciidoctor in man page mode (and ideally in HTML as well). That should be covered now. The triple-plus thing was the first thing that showed good results, after trying backslashes, single-plus quoting and [] after ://. The change of the source code block kind could be considered as unification. I'm combining tabs with spaces within one document though, and I should get rid of the tabs in the rest of it then... --- json-rpc-shell.adoc | 44 +++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/json-rpc-shell.adoc b/json-rpc-shell.adoc index 20b1f8c..c7dab10 100644 --- a/json-rpc-shell.adoc +++ b/json-rpc-shell.adoc @@ -1,8 +1,8 @@ json-rpc-shell(1) ================= :doctype: manpage -:man manual: json-rpc-shell Manual -:man source: json-rpc-shell {release-version} +:manmanual: json-rpc-shell Manual +:mansource: json-rpc-shell {release-version} Name ---- @@ -15,7 +15,7 @@ Synopsis Description ----------- The _ENDPOINT_ must be either an HTTP or a WebSocket URL, with or without TLS -(i.e. one of the _http://_, _https://_, _ws://_, _wss://_ schemas). +(i.e. one of the _+++http+++://_, _+++https+++://_, _ws://_, _wss://_ schemas). *json-rpc-shell* will use it to send any JSON-RPC 2.0 requests you enter on its command line. The server's response will be parsed and validated, stripping it @@ -133,40 +133,34 @@ distribution of this program (public services are hard to find): Pretty-printing and Manual IDs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -``` -$ json-rpc-shell -p ws://localhost:1234 -json-rpc> date 1 -{ - "year": 2020, - "month": 9, - "day": 5, - "hours": 2, - "minutes": 23, - "seconds": 51 -} -``` + $ json-rpc-shell -p ws://localhost:1234 + json-rpc> date 1 + { + "year": 2020, + "month": 9, + "day": 5, + "hours": 2, + "minutes": 23, + "seconds": 51 + } Notification With a Parameter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Notifications never produce a response, not even when the method is not known to the server: -``` -$ json-rpc-shell ws://localhost:1234 -json-rpc> notify {"events": ["conquest", "war", "famine", "death"]} -[Notification] -``` + $ json-rpc-shell ws://localhost:1234 + json-rpc> notify {"events": ["conquest", "war", "famine", "death"]} + [Notification] Piping In and Out ~~~~~~~~~~~~~~~~~ GNU Readline always repeats the prompt, which makes this a bit less useful for invoking from other programs: -``` -$ echo 'ping | jq ascii_upcase' | json-rpc-shell -a ws://localhost:1234 -json-rpc> ping | jq ascii_upcase -"PONG" -``` + $ echo 'ping | jq ascii_upcase' | json-rpc-shell -a ws://localhost:1234 + json-rpc> ping | jq ascii_upcase + "PONG" Reporting Bugs -------------- -- cgit v1.2.3-70-g09d2