Skip to content

Commit

Permalink
docs: update readme with CLI help changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Nov 24, 2021
1 parent 45d4831 commit 74b5648
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $ protoc --python_out=out --proto_path=directory/containing/protos thing1.proto
3. Run `protol` on the generated code

```sh
$ protol --create-init --overwrite -g out --proto-path=directory/containing/protos thing1.proto thing2.proto
$ protol --create-init --overwrite -g out protoc --proto-path=directory/containing/protos thing1.proto thing2.proto
```

The `out/thing1_pb2.py` file should show a diff containing at least these lines:
Expand All @@ -72,21 +72,23 @@ corresponding rewrite rule is fired.
## Help

```
$ protol --help
Usage: protol [OPTIONS] PROTO_FILES...
$ protol
Usage: protol [OPTIONS] COMMAND [ARGS]...
Rewrite protoc-generated imports for use by the proletariat.
Rewrite protoc or buf-generated imports for use by the protoletariat.
Options:
-g, --generated-python-dir DIRECTORY
Directory containing generated Python code
[required]
-p, --proto-path DIRECTORY Protobuf file search path(s). Accepts
multiple values. [required]
--overwrite / --no-overwrite Overwrite all generated Python files with
modified imports
--overwrite / --no-overwrite Overwrite all relevant files under
`generated_python_dir` [default: no-overwrite]
--create-init / --dont-create-init
Create an __init__.py file under the
`generated-python-dir` directory
Create an empty __init__.py file under
`generated_python_dir` [default: dont-create-init]
--help Show this message and exit.
Commands:
buf Use buf to generate the FileDescriptorSet blob
protoc Use protoc to generate the FileDescriptorSet blob
```

0 comments on commit 74b5648

Please sign in to comment.