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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7dcec9f2f9c1c5f46bed45dcd31d97b87c3b8b7d5e4cfbde50b54a173277b29
4
- data.tar.gz: 93450e0c03b424cc94910354407c090063e538e8f6c202bce7e153baebabd35e
3
+ metadata.gz: 625fda3da43d72a0cb2b797731b55a29576fc2beaa0c433d774237258974b8ef
4
+ data.tar.gz: 7c8ca6b166aa2c348301db5f9f071d85a826132c5f14fb7b2a9e6aeaabed468d
5
5
  SHA512:
6
- metadata.gz: 242950430add170c20e636ee10363b44117e94286f7e75f4593b9f10b2fbdea15c2189aa2c19c866fb7eb1ef91279dca8e3a946e70cf2e8ce18dff0476833e51
7
- data.tar.gz: 0e42334a689c790919f9c4cd67a5040cfc3090602c35749fe76af930f3f016a7348f283596c12f4ad2717d0dff921ec809de46891b5d95adf3630446c09aa140
6
+ metadata.gz: cdf1fa49643fff018ef32829a154dadb2587bb846b69b230760c4e221f4678d0a1af7758dfd31738af53eae8138c04a157a84634f05e73c7afa7eee03f07d711
7
+ data.tar.gz: 96533c140b4e946ec812c62fc8eb057e3af0922119943b53c4824a3e853425d58d160ab6c9a3424f92fea54730c2b7c53d7e14bda24b0407fe094701a0b5ec76
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- itools (0.1.5)
4
+ itools (0.1.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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.4
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
@@ -2,3 +2,4 @@ require "itools/version"
2
2
  require "itools/link_map"
3
3
  require "itools/string_searcher"
4
4
  require "itools/find_unuse_img"
5
+ require "itools/get_size"
@@ -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])
@@ -1,3 +1,3 @@
1
1
  module Itools
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
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.5
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-06 00:00:00.000000000 Z
11
+ date: 2018-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler