Skip to content

Commit

Permalink
Improve CLI documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
formatc1702 committed Oct 14, 2020
1 parent 932694c commit ad00747
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
8 changes: 8 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ mywire.bom.tsv BOM (bill of materials) as tab-separated text file
mywire.html HTML page with wiring diagram and BOM embedded
```

#### Command line options

- `--prepend-file <FILE>` to prepend an additional YAML file. Useful for part libraries and templates shared among multiple cables/harnesses.
- `-o <OUTPUT>` or `--output_file <OUTPUT>` to generate output files with a name different from the input file.
- `-v` or `--version` to display the WireViz version.
- `-h` or `--help` to see a summary of the usage help text.


### Syntax description

A description of the WireViz YAML input syntax can be found [here](syntax.md).
Expand Down
30 changes: 24 additions & 6 deletions docs/buildscript.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,29 @@ https://github.com/formatc1702/WireViz/pull/118
TODO: write a better explaination -->

## Commands

- `python build_examples.py` to build generated files in all groups.
- `python build_examples.py compare` to compare generated files in all groups against the last commit.
- `python build_examples.py clean` to delete generated files in all groups.
- `python build_examples.py restore` to restore generated files in all groups from the last commit.
- `python build_examples.py -h` or `--help` to see a summary of the usage help text.


## Options

- Run `python build_examples.py` to build generated files in all groups.
- Run `python build_examples.py compare` to compare generated files in all groups against the last commit.
- Run `python build_examples.py clean` to delete generated files in all groups.
- Run `python build_examples.py restore` to restore generated files in all groups from the last commit.
- Append `-c` or `--compare-graphviz-output` to the `compare` command above to also compare the Graphviz output (default: False).
- Append `-g` or `--groups` followed by space separated group names to any command above, and the set of generated files affected by the command will be limited to the selected groups. Possible group names: `examples`, `tutorial`, `demos`.
- Run `python build_examples.py -h` or with `--help` to see a summary of the usage help text.
- Append `-g` or `--groups` followed by space separated group names to any command above, and the set of generated files affected by the command will be limited to the selected groups.
Possible group names:
- `examples` to process `examples/{readme.md,ex*.*}`
- `tutorial` to process`tutorial/{readme.md,tutorial*.*}`
- `demos` to process`examples/demo*.*`

Affected filetypes: `.gv`, `.bom.tsv`, `.png`, `.svg`, `.html`


## Usage hints

- Run `python build_examples.py` after any code changes to verify that it still is possible to process YAML-input from all groups without errors.
- Run `python build_examples.py compare` after the rebuilding above to verify that the output differences are as expected after a code change.
- Run `python build_examples.py restore` before adding and committing to avoid including changes to generated files after the rebuilding above.

0 comments on commit ad00747

Please sign in to comment.