Sha256: 78c4c2f005a4cd07fd5ad40e893cb15c38abf1b20baa445dca9325e3e50fb26d
Contents?: true
Size: 1.41 KB
Versions: 3
Compression:
Stored size: 1.41 KB
Contents
#!/usr/bin/env ruby require 'thor' require 'xcodeproj_utils' class CLI < Thor desc "xcp_utils lines PROJECT_PATH TARGET_NAME", "Count source lines of files" option :header_only, :type => :boolean, :default => false, :desc => 'Count only header files' option :source_only, :type => :boolean, :default => false, :desc => 'Count only source files' def lines(proj_name, target_name) header_only = options[:header_only] source_only = options[:source_only] proj = XcodeprojUtils::Project.new(proj_name, target_name) if header_only or source_only puts proj.wc(header_only=header_only, source_only=source_only) else puts proj.wc() end end desc "xcp_utils show PROJECT_PATH TARGET_NAME", "Show files in specified target" option :kind, :type => :string, :default => 'source', :desc => 'source or resource' option :fullpath, :type => :boolean, :default => false, :desc => 'full paths will be shown if specified' def show(proj_name, target_name) kind = options[:kind] fullpath = options[:fullpath] proj = XcodeprojUtils::Project.new(proj_name, target_name) proj.show(kind, fullpath) end desc "xcp_utils unused_images PROJECT_PATH TARGET_NAME", "Show unused images" def unused_images(proj_name, target_name) proj = XcodeprojUtils::Project.new(proj_name, target_name) for image in proj.search_unused_images puts image.display_name end end end CLI.start(ARGV)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
xcodeproj_utils-0.2.2 | bin/xcp_utils |
xcodeproj_utils-0.2.1 | bin/xcp_utils |
xcodeproj_utils-0.2.0 | bin/xcp_utils |