Sha256: 832ce1684f55d73f8191a1f7b944f446aab9540a28fc71b46429dd2042ffe23c

Contents?: true

Size: 1.06 KB

Versions: 15

Compression:

Stored size: 1.06 KB

Contents

#!/usr/bin/env ruby

require 'commander/import'
require 'html_email_creator'
require 'html_email_creator/version'
require 'html_email_creator/information'

# :name is optional, otherwise uses the basename of this executable
program :name, 'HTML Email Creator'
program :version, HtmlEmailCreator::VERSION
program :description, HtmlEmailCreator::DESCRIPTION

command :create do |c|
  c.syntax = 'html_email_creator create <email or directory>'
  c.description = 'Creates a single email or all emails from the directory'
  c.option '--norecursive', 'If creating directory, don\'t look into sub directories.'
  c.action do |args, options|
    # TODO implement me
    recursive = options.norecursive ? false : true
    full_path = File.expand_path(args.first, Dir.pwd)
    results = HtmlEmailCreator::EmailCreator.new.save_emails(full_path, recursive)
    say "Creation completed!\n\n"
    results.each_pair do |file, format|
      say "#{file}:"
      say "  Output:"
      format.values.each do |output|

        say "    #{output}"
      end
    end
    say "\nHave a nice day :)"
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
html_email_creator-1.0.18 bin/html_email_creator
html_email_creator-1.0.16 bin/html_email_creator
html_email_creator-1.0.15 bin/html_email_creator
html_email_creator-1.0.14 bin/html_email_creator
html_email_creator-1.0.13 bin/html_email_creator
html_email_creator-1.0.10 bin/html_email_creator
html_email_creator-1.0.9 bin/html_email_creator
html_email_creator-1.0.8 bin/html_email_creator
html_email_creator-1.0.7 bin/html_email_creator
html_email_creator-1.0.6 bin/html_email_creator
html_email_creator-1.0.5 bin/html_email_creator
html_email_creator-1.0.4 bin/html_email_creator
html_email_creator-1.0.3 bin/html_email_creator
html_email_creator-1.0.2 bin/html_email_creator
html_email_creator-1.0.1 bin/html_email_creator