Skip to content

Commit

Permalink
Use description lists in generated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jpikl committed Jul 22, 2023
1 parent bdea0a5 commit 14233e2
Show file tree
Hide file tree
Showing 12 changed files with 159 additions and 39 deletions.
7 changes: 6 additions & 1 deletion docs/reference/rew-ascii.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ rew ascii [OPTIONS]

## Options

### `-d, --delete`
<dl>
<dt><code>-d, --delete</code></dt>
<dd>

Delete non-ASCII characters instead of converting them

</dd>
</dl>

## Global options

See [rew reference](rew.md#global-options) for list of additional global options.
Expand Down
7 changes: 6 additions & 1 deletion docs/reference/rew-first.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ rew first [COUNT]

## Arguments

### `COUNT`
<dl>
<dt><code>COUNT</code></dt>
<dd>

Maximum number of lines to print

**Default value**: `1`

</dd>
</dl>

## Global options

See [rew reference](rew.md#global-options) for list of additional global options.
Expand Down
14 changes: 12 additions & 2 deletions docs/reference/rew-join.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,28 @@ rew join [OPTIONS] [SEPARATOR]

## Arguments

### `SEPARATOR`
<dl>
<dt><code>SEPARATOR</code></dt>
<dd>

Separator

**Default value**: `''`

</dd>
</dl>

## Options

### `-t, --trailing`
<dl>
<dt><code>-t, --trailing</code></dt>
<dd>

Print trailing separator

</dd>
</dl>

## Global options

See [rew reference](rew.md#global-options) for list of additional global options.
Expand Down
7 changes: 6 additions & 1 deletion docs/reference/rew-last.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ rew last [COUNT]

## Arguments

### `COUNT`
<dl>
<dt><code>COUNT</code></dt>
<dd>

Maximum number of lines to print

**Default value**: `1`

</dd>
</dl>

## Global options

See [rew reference](rew.md#global-options) for list of additional global options.
Expand Down
11 changes: 9 additions & 2 deletions docs/reference/rew-seq.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,25 @@ rew seq [FIRST] [INCREMENT]

## Arguments

### `FIRST`
<dl>
<dt><code>FIRST</code></dt>
<dd>

First number in sequence

**Default value**: `1`

### `INCREMENT`
</dd>
<dt><code>INCREMENT</code></dt>
<dd>

Increment between numbers

**Default value**: `1`

</dd>
</dl>

## Global options

See [rew reference](rew.md#global-options) for list of additional global options.
Expand Down
7 changes: 6 additions & 1 deletion docs/reference/rew-skip.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ rew skip <COUNT>

## Arguments

### `COUNT`
<dl>
<dt><code>COUNT</code></dt>
<dd>

Number of lines to skip

</dd>
</dl>

## Global options

See [rew reference](rew.md#global-options) for list of additional global options.
Expand Down
14 changes: 12 additions & 2 deletions docs/reference/rew-split.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,26 @@ rew split [OPTIONS] <SEPARATOR>

## Arguments

### `SEPARATOR`
<dl>
<dt><code>SEPARATOR</code></dt>
<dd>

Separator (single byte character)

</dd>
</dl>

## Options

### `-t, --trailing`
<dl>
<dt><code>-t, --trailing</code></dt>
<dd>

Ignore trailing separator

</dd>
</dl>

## Global options

See [rew reference](rew.md#global-options) for list of additional global options.
Expand Down
7 changes: 6 additions & 1 deletion docs/reference/rew-stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ rew stream [VALUES]...

## Arguments

### `VALUES`
<dl>
<dt><code>VALUES</code></dt>
<dd>

Values to print

</dd>
</dl>

## Global options

See [rew reference](rew.md#global-options) for list of additional global options.
Expand Down
11 changes: 9 additions & 2 deletions docs/reference/rew-trim.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@ rew trim [OPTIONS]

## Options

### `-s, --start`
<dl>
<dt><code>-s, --start</code></dt>
<dd>

Trim the beginning

### `-e, --end`
</dd>
<dt><code>-e, --end</code></dt>
<dd>

Trim the end

</dd>
</dl>

## Global options

See [rew reference](rew.md#global-options) for list of additional global options.
Expand Down
14 changes: 12 additions & 2 deletions docs/reference/rew-x.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,28 @@ rew x [OPTIONS] <PATTERN>

## Arguments

### `PATTERN`
<dl>
<dt><code>PATTERN</code></dt>
<dd>

Composition pattern

</dd>
</dl>

## Options

### `-e, --escape`
<dl>
<dt><code>-e, --escape</code></dt>
<dd>

Escape character for the pattern

**Default value**: `\`

</dd>
</dl>

## Global options

See [rew reference](rew.md#global-options) for list of additional global options.
Expand Down
62 changes: 44 additions & 18 deletions docs/reference/rew.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,52 @@ rew [OPTIONS] <COMMAND>

## Commands

- [ascii](./rew-ascii.md) - Convert characters to ASCII
- [first](./rew-first.md) - Print only the first N lines
- [last](./rew-last.md) - Print only the last N lines
- [lower](./rew-lower.md) - Convert characters to lowercase
- [join](./rew-join.md) - Join lines using a separator
- [x ](./rew-x.md) - Compose commands using a pattern
- [norm](./rew-norm.md) - Normalize line separators to LF
- [loop](./rew-loop.md) - Repeat all lines in a loop
- [seq](./rew-seq.md) - Generate infinite sequence of numbers
- [sink](./rew-sink.md) - Throw away all input
- [skip](./rew-skip.md) - Skip N lines and print the rest
- [split](./rew-split.md) - Split input to lines using a separator
- [stream](./rew-stream.md) - Print arguments as lines
- [trim](./rew-trim.md) - Trim whitespaces from each line
- [upper](./rew-upper.md) - Convert characters to lowercase
<dl>
<dt><a href="rew-ascii.html"><code>ascii</code></a></dt>
<dd>Convert characters to ASCII</dd>
<dt><a href="rew-first.html"><code>first</code></a></dt>
<dd>Print only the first N lines</dd>
<dt><a href="rew-last.html"><code>last</code></a></dt>
<dd>Print only the last N lines</dd>
<dt><a href="rew-lower.html"><code>lower</code></a></dt>
<dd>Convert characters to lowercase</dd>
<dt><a href="rew-join.html"><code>join</code></a></dt>
<dd>Join lines using a separator</dd>
<dt><a href="rew-x.html"><code>x </code></a></dt>
<dd>Compose commands using a pattern</dd>
<dt><a href="rew-norm.html"><code>norm</code></a></dt>
<dd>Normalize line separators to LF</dd>
<dt><a href="rew-loop.html"><code>loop</code></a></dt>
<dd>Repeat all lines in a loop</dd>
<dt><a href="rew-seq.html"><code>seq</code></a></dt>
<dd>Generate infinite sequence of numbers</dd>
<dt><a href="rew-sink.html"><code>sink</code></a></dt>
<dd>Throw away all input</dd>
<dt><a href="rew-skip.html"><code>skip</code></a></dt>
<dd>Skip N lines and print the rest</dd>
<dt><a href="rew-split.html"><code>split</code></a></dt>
<dd>Split input to lines using a separator</dd>
<dt><a href="rew-stream.html"><code>stream</code></a></dt>
<dd>Print arguments as lines</dd>
<dt><a href="rew-trim.html"><code>trim</code></a></dt>
<dd>Trim whitespaces from each line</dd>
<dt><a href="rew-upper.html"><code>upper</code></a></dt>
<dd>Convert characters to lowercase</dd>
</dl>

## Global options

### `-0, --null`
<dl>
<dt><code>-0, --null</code></dt>
<dd>

Line delimiter is NUL, not newline

**Environment variable**: `REW_NULL`

### `--buff`
</dd>
<dt><code>--buff</code></dt>
<dd>

Output buffering.

Expand All @@ -45,7 +66,9 @@ Output buffering.

**Environment variable**: `REW_BUFF`

### `--max-line`
</dd>
<dt><code>--max-line</code></dt>
<dd>

Maximum size of an input line.

Expand All @@ -57,3 +80,6 @@ Using `0` as a value will disable the limit.

**Environment variable**: `REW_MAX_LINE`

</dd>
</dl>

Loading

0 comments on commit 14233e2

Please sign in to comment.