add wordcount
parent
08171d11f5
commit
5e7ea69e56
|
@ -0,0 +1,16 @@
|
||||||
|
# 全书字数统计
|
||||||
|
|
||||||
|
## 使用说明
|
||||||
|
|
||||||
|
首先需要安装`cnworcount`,见:https://github.com/rootsongjc/cnwordcount
|
||||||
|
|
||||||
|
在该目录下执行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./wordcount
|
||||||
|
...
|
||||||
|
usecases/service-mesh.md 1306
|
||||||
|
usecases/spark-standalone-on-kubernetes.md 285
|
||||||
|
usecases/understanding-serverless.md 3481
|
||||||
|
Total 136674
|
||||||
|
```
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Count Chinese characters
|
# Count Chinese characters
|
||||||
total=0
|
total=0
|
||||||
basedir="../"
|
basedir="../../"
|
||||||
for x in `cd $basedir;fd -e md`
|
for x in `cd $basedir;fd -e md`
|
||||||
do
|
do
|
||||||
i=`cnwordcount -f $basedir/$x|cut -d " " -f2`
|
i=`cnwordcount -f $basedir/$x|cut -d " " -f2`
|
Loading…
Reference in New Issue