From 3e77c2997bf1ef1dcfdccea4c5b3599a1ebb5542 Mon Sep 17 00:00:00 2001 From: gardenapple Date: Fri, 15 Oct 2021 19:30:25 +0300 Subject: [PATCH] Slightly improve man formatting --- README.md | 22 +--------------------- readable.1 | 4 ++-- readable.1.md | 4 ++-- 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 4c799e5..3cde1c4 100644 --- a/README.md +++ b/README.md @@ -35,29 +35,9 @@ Arch Linux users may use the [readability-cli](https://aur.archlinux.org/package where `SOURCE` is a file, an http(s) URL, or '-' for standard input -See [readable(1)](readable.1.md) for more information. +**See [readable(1)](readable.1.md) for more information, and usage examples.** -### Examples - -**Read HTML from a file and output the result to the console:** - -`readable index.html` - -**Fetch a random Wikipedia article, get its title and an excerpt:** - -`readable https://en.wikipedia.org/wiki/Special:Random -p title,excerpt` - -**Fetch a web page and read it in W3M:** - -`readable https://www.nytimes.com/2020/01/18/technology/clearview-privacy-facial-recognition.html | w3m -T text/html` - -**Download a web page using [cURL](https://en.wikipedia.org/wiki/CURL), parse it and output as JSON:** - -`curl https://github.com/mozilla/readability | readable --base=https://github.com/mozilla/readability --json` - -It's a good idea to supply the --base parameter when piping input, otherwise `readable` won't know the document's URL, and things like relative links won't work. - ## Localization See [locales](locales). diff --git a/readable.1 b/readable.1 index 9e06dd2..b1cba01 100644 --- a/readable.1 +++ b/readable.1 @@ -154,7 +154,7 @@ The \fB\-\-properties\fP option accepts a list of values, separated by spaces\. Properties are printed line by line, in the order specified by the user\. Only "text\-content" and "html\-content" is printed as multiple lines\. .SH EXIT STATUS .P -As usual, exit code 0 indicates success, and anything other than 0 is an error\. \fBreadability\-cli\fR uses standard\fB*\fP error codes: +As usual, exit code 0 indicates success, and anything other than 0 is an error\. \fBreadability\-cli\fR uses standard* error codes: .TS tab(|) expand nowarn box; l l. @@ -191,7 +191,7 @@ Permission denied: can't read file T} .TE .P -\fB*\fP By "standard error codes" I mean "close to a standard"\. And by that I mean: I actually don't remember any command line tools which use this convention\. You may find more info in \fBsysexits\fR(3), or maybe just \fIsysexits\.h\fR\|\. +* By "standard error codes" I mean "close to a standard"\. And by that I mean: I actually don't remember any command line tools which use this convention\. You may find more info in \fBsysexits\fR(3), or maybe just \fIsysexits\.h\fR\|\. .SH ENVIRONMENT .P \fBreadability\-cli\fR supports localization, using the environment variables \fBLC_ALL\fP, \fBLC_MESSAGES\fP, \fBLANG\fP and \fBLANGUAGE\fP, in that order\. Only one language at a time is supported\. diff --git a/readable.1.md b/readable.1.md index dcc61bd..c8fabec 100644 --- a/readable.1.md +++ b/readable.1.md @@ -97,7 +97,7 @@ Properties are printed line by line, in the order specified by the user. Only "t ## EXIT STATUS -As usual, exit code 0 indicates success, and anything other than 0 is an error. **readability-cli** uses standard`*` error codes: +As usual, exit code 0 indicates success, and anything other than 0 is an error. **readability-cli** uses standard\* error codes: | Error code | Meaning | | --: | :-- | @@ -107,7 +107,7 @@ As usual, exit code 0 indicates success, and anything other than 0 is an error. | **68** | Unknown host name for URL | | **77** | Permission denied: can't read file | -`*` By "standard error codes" I mean "close to a standard". And by that I mean: I actually don't remember any command line tools which use this convention. You may find more info in **sysexits**(3), or maybe just *sysexits.h*. +\* By "standard error codes" I mean "close to a standard". And by that I mean: I actually don't remember any command line tools which use this convention. You may find more info in **sysexits**(3), or maybe just *sysexits.h*. ## ENVIRONMENT