Skip to content

Commit

Permalink
upgrade version (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
alingse authored Nov 26, 2022
1 parent 12749d8 commit 14b8dc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ the parser is https://github.com/alingse/thrift-parser
## Usage

```bash
thrift-fmt -w mythrift.thrift
thrift-fmt mythrift.thrift
```

```bash
Expand All @@ -20,33 +20,26 @@ pip install thrift-fmt
```
### format files

single file

format single file and print to stdout
```bash
thrift-fmt mythrift.thrift
```

format and overwrite the origin file
```bash
thrift-fmt -w mythrift.thrift
```

or directory (this will overwrite the origin file, please keep in track)

format a directory, this will overwrite the origin file, please keep in track
```bash
thrift-fmt -d ./thrift_files
```

or more options see help

```bash
thrift-fmt --help
```

## Use in Code

use `ThriftData` parse from file / stdin / str

use `ThriftFormatter` or `PureThriftFormatter` format the data
use `ThriftFormatter` or `PureThriftFormatter` format the parsed thrift data.

```python
from thrift_fmt import ThriftFormatter, PureThriftFormatter
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "thrift-fmt"
version = "0.2.6"
version = "0.2.7"
description = "formart thrift file"
authors = [
{name = "alingse", email = "alingse@foxmail.com"},
Expand Down

0 comments on commit 14b8dc3

Please sign in to comment.