bin/hyla in hyla-1.0.1 vs bin/hyla in hyla-1.0.2

- old
+ new

@@ -13,13 +13,10 @@ require 'hyla/project' program :version, Hyla::VERSION program :description, Hyla::DESCRIPTION -# global_option '-s', '--source [DIR]', 'Source directory (defaults to ./)' -# global_option '-d', '--destination [DIR]', 'Destination directory (defaults to .)' - default_command :default def add_build_options(c) c.option '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file' c.option '-V', '--verbose', 'Print verbose output.' @@ -32,11 +29,11 @@ # # Creates a new Hyla project using a template or blank to the PATH specified # command :new do |c| - c.syntax = 'hyla new PATH' + c.syntax = 'hyla new PATH [options]' c.description = 'Creates a new Hyla project using a template or blank to the PATH specified' c.option '--f','--force', 'Force creation even if PATH already exists' c.option '--b','--blank', 'Creates project but with empty files' c.option '--t','--template_type TEMPLATE_TYPE', String, 'Template Type to be used (documentation, book, training, training-exercises, blog, web, ...)' @@ -47,11 +44,11 @@ # # Creates a new file from an artefact within an existing project # command :create do |c| - c.syntax = 'hyla create ARTEFACT TYPE' + c.syntax = 'hyla create ARTEFACT TYPE [options]' c.description = 'Creates a new file from asciidoc artefact for an existing project' c.option '--a', '--artefact_type [ARTEFACT_TYPE]', String, 'Artefact Type : article, audio, video, blog entry ...' c.option '--t', '--type [TYPE]', String, 'Type : asciidoc, slideshow' add_common_options(c) @@ -67,14 +64,15 @@ # command :generate do |c| c.syntax = 'hyla generate [OPTIONS]' c.description = 'Generate content from asciidoc files (Table Of Content, modules, ...) to HTML, Slideshow' c.option '--b', '--backend [BACKEND]', String, 'Backend to be used : HTML5, deckjs, revealjs, ...' + c.option '-f', '--file [HTML FILE]', String, 'HTML File name' c.option '--p', '--project_name [PROJECT_NAME]', String, 'Project Name' - c.option '--r', '--rendering [RENDERING]', String, 'Code of the rendering : toc2html, adoc2html' + c.option '--r', '--rendering [RENDERING]', String, 'Code of the rendering : adoc2html, adoc2slide, toc2adoc, index2slide' c.option '--t', '--toc [PATH]', String, 'File Path of the asciidoc file containing the Table of Content' - c.option '--st', '--style [STYLE]', String, 'Stylesheet theme to be applied : asciidoctor, redhat, github, colony, foundation, ...' + c.option '--st', '--style [STYLE]', String, 'Stylesheet theme to be applied : asciidoctor, liberation, github, colony, foundation, ...' c.option '--a', '--attributes [KEY=VALUE,KEY=VALUE]', String, 'Asciidoctor attributes' add_common_options(c) c.action do |args, options| @@ -116,9 +114,27 @@ options.default :serving => true Hyla::Commands::Serve.process(args, options.__hash__) end end alias_command :server, :serve + +# +# Send as email attachment HTML file +# +command :sendmail do |c| + c.syntax = 'hyla sendmail [options]' + c.description = 'Send as HTML Attachment an email to the SMTP Server defined' + c.option '-f', '--file [File]', String, 'File to be attached' + c.option '-l', '--location [PATH]', String, 'Directory containing file to be attached' + c.option '-e', '--email_attributes [KEY=VALUE,KEY=VALUE]', String, 'Email attributes used to configure smtp server, port number, user password, authentication mode, sender, recipient, subject' + + add_common_options(c) + + c.action do |args, options| + config = Hyla::Configuration.parse(options.__hash__) + Hyla::Commands::Sendmail.process(args, config) + end +end # NOT YET AVAILABLE =begin