Improve options generation README and picky directory refacto

This commit is contained in:
jcamiel 2023-11-17 13:29:54 +01:00
parent 481a13a3d6
commit 990c53b0b0
No known key found for this signature in database
GPG Key ID: 07FF11CFD55356CC
58 changed files with 31 additions and 8 deletions

View File

@ -1,8 +0,0 @@
# Format all option files
bin/spec/cmdline-opts/format.py docs/spec/cmdline-opts-hurl/*.option
# Generate/Update clap command source file
bin/spec/cmdline-opts/generate_source.py docs/spec/cmdline-opts-hurl/*.option >packages/hurl/src/cli/options/commands.rs
# Generate/Update man options
bin/spec/cmdline-opts/generate_man.py docs/spec/cmdline-opts-hurl/*.option

View File

@ -0,0 +1,31 @@
# Command Line Options
Hurl command line options are described with `.option` files. These files are used to generate:
- Rust code to parse this options in `hurl`/`hurlfmt` packages
- Man options
## Format all option files
```shell
$ bin/spec/options/format.py docs/spec/options/**/*.option
```
This script insures that all `.option` files are well formatted.
## Generate/Update clap command source file
```shell
$ bin/spec/options/generate_source.py docs/spec/options/hurl/*.option > packages/hurl/src/cli/options/commands.rs
```
This script generates Rust source file for parsing command line option.
## Generate/Update man options
```shell
$ bin/spec/options/generate_man.py docs/spec/options/hurl/*.option
```
This script generates (part of) man file for `hurl` / `hurlfmt`.