itools 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +12 -1
- data/bin/itools +8 -0
- data/lib/itools.rb +1 -0
- data/lib/itools/string_searcher.rb +1 -0
- data/lib/itools/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 625fda3da43d72a0cb2b797731b55a29576fc2beaa0c433d774237258974b8ef
|
4
|
+
data.tar.gz: 7c8ca6b166aa2c348301db5f9f071d85a826132c5f14fb7b2a9e6aeaabed468d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdf1fa49643fff018ef32829a154dadb2587bb846b69b230760c4e221f4678d0a1af7758dfd31738af53eae8138c04a157a84634f05e73c7afa7eee03f07d711
|
7
|
+
data.tar.gz: 96533c140b4e946ec812c62fc8eb057e3af0922119943b53c4824a3e853425d58d160ab6c9a3424f92fea54730c2b7c53d7e14bda24b0407fe094701a0b5ec76
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -19,13 +19,14 @@ SYNOPSIS
|
|
19
19
|
itools [global options] command [command options] [arguments...]
|
20
20
|
|
21
21
|
VERSION
|
22
|
-
0.1.
|
22
|
+
0.1.5
|
23
23
|
|
24
24
|
GLOBAL OPTIONS
|
25
25
|
--help - Show this message
|
26
26
|
--version - Display the program version
|
27
27
|
|
28
28
|
COMMANDS
|
29
|
+
find - search unuse image
|
29
30
|
help - Shows a list of commands or help for one command
|
30
31
|
parse - Analyze the memory footprint of each part or component in Xcode project
|
31
32
|
search - search str(or strs) in some file(or folder's file)
|
@@ -78,6 +79,16 @@ itools search /Users/zhanggui/zhanggui/my-dev MAYGO
|
|
78
79
|
itools search /Users/zhanggui/zhanggui/Ruby/ 3434,Scott
|
79
80
|
```
|
80
81
|
将会在/Users/zhanggui/zhanggui/Ruby/中查找所有包含3434和Scott的文件,并生成excel。
|
82
|
+
|
83
|
+
### 功能3:查找工程中无用的图片
|
84
|
+
命令
|
85
|
+
```
|
86
|
+
itools find /Users/zhanggui/zhanggui/tdp
|
87
|
+
```
|
88
|
+
这里的目录代表项目的根目录,查找原理为:
|
89
|
+
先将目录下面所有的图片(仅支持png、jpg、gif)找到,然后遍历所有.m文件。查找出没有使用的图片。
|
90
|
+
**注:这里查找不太准确,仅供参考,因为有可能有的图片不是通过.m文件使用的。而有的图片仅仅是为了配置(例如1024*1024),所以还是不要依赖该工具的图片查找,找到之后可以自行再次确认一下。**
|
91
|
+
|
81
92
|
## Contributing
|
82
93
|
|
83
94
|
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
|
data/bin/itools
CHANGED
@@ -30,4 +30,12 @@ command :find do |c|
|
|
30
30
|
Itools::ImgFinder.find(args[0])
|
31
31
|
end
|
32
32
|
end
|
33
|
+
# 计算占用内存大小
|
34
|
+
desc "calculate the memory footprint of file or folder(contain file)"
|
35
|
+
arg 'xxx.txt'
|
36
|
+
command :sizeFor do |c|
|
37
|
+
c.action do |global_options, options, args|
|
38
|
+
Itools::Memory.sizeFor(args[0])
|
39
|
+
end
|
40
|
+
end
|
33
41
|
exit run(ARGV)
|
data/lib/itools.rb
CHANGED
@@ -52,6 +52,7 @@ module Itools
|
|
52
52
|
def search_in_file(temp_file)
|
53
53
|
line_index = 1
|
54
54
|
File.read(temp_file).each_line do |line|
|
55
|
+
puts line
|
55
56
|
haveIndex = StringHandle.containsStr(line,@search_strs)
|
56
57
|
if haveIndex != -1
|
57
58
|
search_result = SearchResult.new(temp_file,line_index,line,@search_strs[haveIndex])
|
data/lib/itools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zhanggui
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|