README.md in itools-0.4.1 vs README.md in itools-0.4.2
- old
+ new
@@ -17,25 +17,25 @@
SYNOPSIS
itools [global options] command [command options] [arguments...]
VERSION
- 0.3.0
+ 0.4.2
GLOBAL OPTIONS
--help - Show this message
--version - Display the program version
COMMANDS
+ count_code_line - count lines of code
find - search unuse image
help - Shows a list of commands or help for one command
parse - Analyze the memory footprint of each part or component in Xcode project
search - search str(or strs) in some file(or folder's file)
- searchFile - search File in folder
+ search_file - search File in folder
search_unuse_class - search unuse class
- sizeFor - calculate the memory footprint of file or folder(contain file)
-
+ size_for - calculate the memory footprint of file or folder(contain file)
```
### 功能1:解析LinkMap
命令:
```shell
@@ -94,29 +94,38 @@
**注:这里查找不太准确,仅供参考,因为有可能有的图片不是通过.m文件使用的。而有的图片仅仅是为了配置(例如1024*1024),所以还是不要依赖该工具的图片查找,找到之后可以自行再次确认一下。**
### 功能4:计算文件大小
命令
```
-itools sizeFor /Users/zhanggui/zhanggui/my 1000
+itools size_for /Users/zhanggui/zhanggui/my 1000
or
- itools sizeFor /Users/zhanggui/zhanggui/my
+ itools size_for /Users/zhanggui/zhanggui/my
```
计算sizeFor后面跟的参数内容所占内存大小,如果参数为文件路径,则计算文件大小,如果是文件夹,会遍历所有文件,然后计算大小。第二个参数为计算系数(这个系数为1MB = 1024KB中的1024;windows为1024,mac为1000,不传默认为1024)。
在中途会提示你输入要查找的文件后缀,不输入任何则表示查找文件夹下的所有文件,输入后缀则会计算特定文件类型包含的大小,例如:png,jpg,gif,这样会计算出文件夹中三种类型格式的图片所占有内存的大小。
### 功能5:查找文件
命令
```
-itools searchFile /Users/zhanggui/zhanggui/my-dev/search_vc ViewController.m #第二个参数现在只支持单字符串查找
+itools search_file /Users/zhanggui/zhanggui/my-dev/search_vc ViewController.m #第二个参数现在只支持单字符串查找
```
查找/Users/zhanggui/zhanggui/my-dev/search_vc文件夹下所有的文件名包含ViewController.m的文件,并且输出到excel表格
### 功能6:查找工程中无用的文件
命令
```
itools search_unuse_class /Users/zhanggui/zhanggui/my-dev/search_vc
```
参数为工程所在的文件夹,例如/Users/zhanggui/zhanggui/my-dev/search_vc。查出的结果可能包含category或者extension,请拿结果作为参考,不作为最终要删除的文件。
+
+### 功能7:统计代码行数
+命令
+```
+itools count_code_line 文件路径/文件夹路径
+#例如
+itools count_code_line /User/zhanggui/mydemoapp #统计mydemoapp项目的代码行数
+```
+该工具只统计了.m、.mm、.h、.cpp这几个文件,并且不包含单行注释以及空行。
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/ScottZg/itools. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the
## Warning
\ No newline at end of file