class AppCommand::GenerateUIFavIcon
Constants
- ACCEPTED_IMG_FORMATS
Public Instance Methods
execute()
click to toggle source
# File lib/routes/generate/generate_img_favicon.rb, line 9 def execute begin @opts = command_options @args = arguments opts_validate opts_routing rescue => e Blufin::Terminal::print_exception(e) end end
opts_routing()
click to toggle source
Generates a favicon.ico file (using ImageMagick) @return void
# File lib/routes/generate/generate_img_favicon.rb, line 35 def opts_routing # TODO - FAVICON GENERATOR - https://medium.com/@morsetree/creating-a-favicon-command-line-8f6bf224e360 img = 'path-to-img.jpg|png' cmd = <<TEMPLATE convert #{img} -background white \ \( -clone 0 -resize 16x16 -extent 16x16 \) \ \( -clone 0 -resize 32x32 -extent 32x32 \) \ \( -clone 0 -resize 48x48 -extent 48x48 \) \ \( -clone 0 -resize 64x64 -extent 64x64 \) \ -delete 0 -alpha off -colors 256 favicon.ico TEMPLATE puts cmd raise RuntimeError, 'Not yet implemented!' end
opts_validate()
click to toggle source
# File lib/routes/generate/generate_img_favicon.rb, line 27 def opts_validate # TODO - Validate end