Sha256: 16104400c5dea39c583d56b58e79339c1ff57814da85703a537a79d26aedb6af

Contents?: true

Size: 1.88 KB

Versions: 3

Compression:

Stored size: 1.88 KB

Contents

#!/usr/bin/env ruby
require 'gli'
require 'itools'

include GLI::App
 
program_desc 'a collection of tools for ios developer'
version Itools::VERSION

desc "Analyze the memory footprint of each part or component in Xcode project"
arg 'xxx.txt'
command :parse do |c|
    c.action do |global_options, options, args|
         Itools::LinkMap.parser(args[0])
    end
end

desc "search str(or strs) in some file(or folder's file)"
arg 'xxx.txt'
command :search do |c|
    c.action do |global_options, options, args|
         Itools::StringSearcher.search_result(args[0],args[1])
    end
end
# 查找工程中没有用到的图片
desc "search unuse image"
arg 'xxx.txt'
command :find do |c|
    c.action do |global_options, options, args|
         Itools::ImgFinder.find(args[0])
    end
end
# 查找Xcode工程中没有用到的类
desc "search unuse class"
arg 'xxx.txt'
command :search_unuse_class do |c|
    c.action do |global_options, options, args|
         Itools::ClassFinder.search_unuse_class(args)
    end
end

# 计算占用内存大小
desc "calculate the memory footprint of file or folder(contain file)"
arg 'xxx.txt'
command :size_for do |c|
    c.action do |global_options, options, args|
         Itools::Memory.sizeFor(args)
    end
end

# 查找文件
desc "search File in folder"
arg 'file name'
command :search_file do |c|
    c.action do |global_options, options, args|
         Itools::FileSearcher.searchFile(args)
    end
end

# 统计代码行数
desc "count lines of code"
arg 'file name or folder'
command :count_code_line do |c|
    c.action do |global_options, options, args|
         Itools::CodeCouner.count_line(args)
    end
end

#本地commit规范化
desc "通过执行该命令,hook 本地commit,然后进行规范化"
arg 'git项目根目录'
command :pre_commit do |c|
    c.action do |global_options,options, args|
        Itools::GitSets.commit_msg_init(args)
    end
end
exit run(ARGV)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
itools-0.4.8 bin/itools
itools-0.4.7 bin/itools
itools-0.4.6 bin/itools