Sha256: 237d9423c6ebe22d7e8b91ad2a8b9e4d57c8e9ce56f6b2d88d1695b505372204
Contents?: true
Size: 1.48 KB
Versions: 1
Compression:
Stored size: 1.48 KB
Contents
# Copyright (c) 2020 Jean-Sebastien Gelinas, see LICENSE.txt # frozen_string_literal: true require 'gli' require 'semantic_logger' require 'tileset_tooling/version' require 'tileset_tooling/commands' require 'tileset_tooling/utils' # Core module for the project module ::TilesetTooling end # Core application for the project; sets up the GLI configuration and such class ::TilesetTooling::App extend ::GLI::App program_desc 'Bits of tooling I use for working with tilesets' version ::TilesetTooling::VERSION subcommand_option_handling :normal arguments :strict pre do # Set the global default log level and add appender ::SemanticLogger.sync! ::SemanticLogger.default_level = :trace ::SemanticLogger.add_appender(io: $stdout, formatter: :color) true end post do end on_error do |error| puts(error) puts(error.backtrace) true end desc 'Commands relating to bleed around tiles' command :bleed do |bleed_command| bleed_command.arg(:input_file) bleed_command.desc('Inserts a bleed around tiles') bleed_command.command(:insert) do |insert_command| insert_command.switch([:'skip-specs'], desc: 'Skips the reading of the specs') insert_command.flag([:output], default_value: nil, desc: 'Path where to store result', arg_name: 'path') insert_command.action do |_, options, args| command = ::TilesetTooling::Commands::InsertBleed.new(options, args) command.unpack! command.run end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tileset_tooling-0.0.2 | lib/tileset_tooling/app.rb |