Skip to content

Commit d00590c

Browse files
committed
minor changes to docs
1 parent 8fc8317 commit d00590c

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

book/src/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ In a terminal:
1818

1919
- Simple interfaces
2020

21-
- Top-level, annotation-based.
21+
- High-level, annotation-based, CLI generator.
2222

2323
- Lower-level interface inspired by the
2424
[argparse](https://docs.python.org/3/library/argparse.html) package from Python.
@@ -49,5 +49,6 @@ available on maven central under the coordinates:
4949

5050
| Channel | Links |
5151
|---------|-------|
52+
| Forum | [GitHub Discussions](https://github.com/jodersky/scala-argparse/discussions) |
5253
| Chat | [![discord](https://img.shields.io/badge/chat-discord-blue)](https://discord.gg/usj9DC8FDN) [![project chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://crashbox.zulipchat.com/#narrow/stream/330744-argparse) |
5354
| Issues | [GitHub](https://github.com/jodersky/scala-argparse/issues) |

book/src/annotation.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ such as help messages and bash completion.[^1]
88
3.3.0), you will need to write a tiny boilerplate snippet as shown in the
99
introductory example.
1010

11-
Note: the generated code uses a lower-level interface, which can also be
12-
directly used for more flexibility. It is suggested that you [read the
13-
tutorial](./ll/index.html) in any case, for further understanding of how
14-
argument parsing works at a lower level.
11+
The generated code uses a [lower-level interface](./ll/index.html), which you
12+
can also use directly if you would like more flexibility than what the
13+
auto-generated CLI provides.
1514

1615
### Parameter Mapping
1716

@@ -46,10 +45,6 @@ for many types out-of-the-box. Some examples:
4645
- various `java.time` date types
4746
- `key=value` pairs of other supported types
4847

49-
The mechanism in which command line arguments are converted to Scala types is
50-
highly customizable and [new types can easily be
51-
added](./ll/cookbook.md#adding-support-for-a-new-type-of-parameter).
52-
5348
E.g.
5449

5550
```scala
@@ -60,6 +55,10 @@ E.g.
6055
{{#include ../../examples/annotation-types/src/shell.txt}}
6156
```
6257

58+
The mechanism by which command line arguments are converted to Scala types is
59+
highly customizable and [new types can easily be
60+
added](./ll/cookbook.md#adding-support-for-a-new-type-of-parameter).
61+
6362
### Parameter Overrides
6463

6564
The generated command line parameters can further be customized by annotating
@@ -129,9 +128,9 @@ of parameters. See the `git` or `docker` tools for some such examples.
129128

130129
In scala-argparse, nested commands use the same mechanism as single, top-level
131130
commands, with one small twist: instead of annotating a *method* with
132-
`command()`, you annotate a *class definition* (or a function that returns an
133-
instance of an annotated class). This can be done recursively, and classes can
134-
declare parameters which can be referenced by child commands.
131+
`command()`, you annotate a *class definition* (or a method that returns an
132+
instance of a class containing other commands). This can be done recursively,
133+
and classes can declare parameters which can be referenced by child commands.
135134

136135
E.g.
137136

@@ -164,7 +163,7 @@ Any program that uses scala-argparse automatically gets:
164163

165164
- Now that you know the high-level API, check out the [lower-level
166165
API](./ll/index.html), which underpins the former and can be helpful for
167-
understanding cusomizations.
166+
understanding customizations.
168167

169168
- Read the API docs. Start with the [`argparse.default`
170169
bundle](javadoc/api/argparse/default$.html).

book/src/ll/tutorial.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Here is what is happening:
103103
specify it). Specifying anything else results in an error. But even then, we
104104
do get a useful usage message, also for free.
105105

106-
## Introducing Required Parameters
106+
## Required Parameters
107107

108108
An example:
109109

@@ -167,7 +167,7 @@ Following is a result of running the code:
167167

168168
That went well. The program now even helpfully quits on bad input.
169169

170-
## Introducing Optional Parameters
170+
## Optional Parameters
171171

172172
So far the parameters that we have specified were required. Let's look at how we
173173
can make an argument optional.
@@ -194,7 +194,7 @@ Here is what's happening:
194194
- The default value will be used if the argument is not encountered on the
195195
command-line.
196196

197-
## Introducing Repeated Parameters
197+
## Repeated Parameters
198198

199199
An example:
200200

0 commit comments

Comments
 (0)