Skip to content

Commit

Permalink
update for release v1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
tamada committed Mar 5, 2021
1 parent f41ac60 commit cad2919
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 30 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Note that this product is an example project for implementing Open Source Softwa
### :shoe: CLI mode

```shell
wildcat version 1.0.0
wildcat version 1.0.3
wildcat [CLI_MODE_OPTIONS|SERVER_MODE_OPTIONS] [FILEs...|DIRs...|URLs...]
CLI_MODE_OPTIONS
-b, --byte prints the number of bytes in each input file.
Expand Down Expand Up @@ -236,9 +236,9 @@ Post the files to `https://secret-coast-70208.herokuapp.com/wildcat/api/counts`,

```
$ curl -X POST --data-binary @testdata/archives/wc.jar https://secret-coast-70208.herokuapp.com/wildcat/api/counts
{"timestamp":"2021-02-22T02:40:26+09:00","results":[{"filename":"<request>","lines":5,"words":62,"characters":1054,"bytes":1080}]}
{"timestamp":"2021-02-22T02:40:26+09:00","results":[{"filename":"<request>","lines":"5","words":"62","characters":"1,054","bytes":"1,080"}]}
$ curl -X POST --data-binary @testdata/archives/wc.jar https://secret-coast-70208.herokuapp.com/wildcat/api/counts?file-name=wc.jar
{"timestamp":"2021-02-22T02:40:35+09:00","results":[{"filename":"wc.jar!humpty_dumpty.txt","lines":4,"words":26,"characters":142,"bytes":142},{"filename":"wc.jar!ja/","lines":0,"words":0,"characters":0,"bytes":0},{"filename":"wc.jar!ja/sakura_sakura.txt","lines":15,"words":26,"characters":118,"bytes":298},{"filename":"wc.jar!london_bridge_is_broken_down.txt","lines":59,"words":260,"characters":1341,"bytes":1341},{"filename":"total","lines":78,"words":312,"characters":1601,"bytes":1781}]}
{"timestamp":"2021-02-22T02:40:35+09:00","results":[{"filename":"wc.jar!humpty_dumpty.txt","lines":4,"words":26,"characters":142,"bytes":"142"},{"filename":"wc.jar!ja/","lines":"0","words":"0","characters":"0","bytes":"0"},{"filename":"wc.jar!ja/sakura_sakura.txt","lines":"15","words":"26","characters":"118","bytes":"298"},{"filename":"wc.jar!london_bridge_is_broken_down.txt","lines":"59","words":"260","characters":"1,341","bytes":"1,341"},{"filename":"total","lines":78,"words":"312","characters":"1,601","bytes":"1,781"}]}
```

## :anchor: Install
Expand Down
57 changes: 30 additions & 27 deletions docs/content/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ CLI_MODE_OPTIONS
-w, --word prints the number of words in each input file.
-f, --format <FORMAT> prints results in a specified format. Available formats are:
csv, json, xml, and default. Default is default.
-H, --humanize prints sizes in humanization.
-n, --no-ignore Does not respect ignore files (.gitignore).
If this option was specified, wildcat read .gitignore.
-N, --no-extract-archive Does not extract archive files. If this option was specified,
Expand Down Expand Up @@ -73,18 +74,18 @@ Default format is almost same as the result of `wc`.
lines words characters bytes
4 26 142 142 testdata/wc/humpty_dumpty.txt
15 26 118 298 testdata/wc/ja/sakura_sakura.txt
59 260 1341 1341 testdata/wc/london_bridge_is_broken_down.txt
78 312 1601 1781 total
59 260 1,341 1,341 testdata/wc/london_bridge_is_broken_down.txt
78 312 1,601 1,781 total
```

#### Csv

```csv
file name,lines,words,characters,bytes
testdata/wc/humpty_dumpty.txt,4,26,142,142
testdata/wc/ja/sakura_sakura.txt,15,26,118,298
testdata/wc/london_bridge_is_broken_down.txt,59,260,1341,1341
total,78,312,1601,1781
testdata/wc/humpty_dumpty.txt,"4","26","142","142"
testdata/wc/ja/sakura_sakura.txt,"15","26","118","298"
testdata/wc/london_bridge_is_broken_down.txt,"59","260","1,341","1,341"
total,"78","312","1,601","1,781"
```

#### Json
Expand All @@ -97,31 +98,31 @@ The following json is formatted by `jq .`.
"results": [
{
"filename": "testdata/wc/humpty_dumpty.txt",
"lines": 4,
"words": 26,
"characters": 142,
"bytes": 142
"lines": "4",
"words": "26",
"characters": "142",
"bytes": "142"
},
{
"filename": "testdata/wc/ja/sakura_sakura.txt",
"lines": 15,
"words": 26,
"characters": 118,
"bytes": 298
"lines": "15",
"words": "26",
"characters": "118",
"bytes": "298"
},
{
"filename": "testdata/wc/london_bridge_is_broken_down.txt",
"lines": 59,
"words": 260,
"characters": 1341,
"bytes": 1341
"lines": "59",
"words": "260",
"characters": "1,341",
"bytes": "1,341"
},
{
"filename": "total",
"lines": 78,
"words": 312,
"characters": 1601,
"bytes": 1781
"lines": "78",
"words": "312",
"characters": "1,601",
"bytes": "1,781"
}
]
}
Expand Down Expand Up @@ -154,15 +155,15 @@ The following xml is formatted by `xmllint --format -`
<file-name>testdata/wc/london_bridge_is_broken_down.txt</file-name>
<lines>59</lines>
<words>260</words>
<characters>1341</characters>
<bytes>1341</bytes>
<characters>1,341</characters>
<bytes>1,341</bytes>
</result>
<result>
<file-name>total</file-name>
<lines>78</lines>
<words>312</words>
<characters>1601</characters>
<bytes>1781</bytes>
<characters>1,601</characters>
<bytes>1,781</bytes>
</result>
</results>
</wildcat>
Expand All @@ -184,7 +185,9 @@ $ docker run -p 8080:8080 -v $PWD:/home/wildcat ghcr.io/tamada/wildcat:1.0.0 --s

#### versions

* `1.0.1`, `latest`
* `1.0.3`, `latest`
* `1.0.2`
* `1.0.1`
* `1.0.0`

### :surfer: Heroku
Expand Down

0 comments on commit cad2919

Please sign in to comment.