hyla 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +8 -8
  2. data/.gitignore +30 -0
  3. data/LICENSE.txt +10 -19
  4. data/README.adoc +67 -6
  5. data/bin/hyla +22 -20
  6. data/documentation/introduction.adoc +57 -60
  7. data/documentation/scripts/create_adoc_from_toc.sh +20 -0
  8. data/documentation/scripts/create_adoc_from_toc_config.sh +24 -0
  9. data/documentation/scripts/create_myblankproject.sh +12 -0
  10. data/documentation/scripts/create_myblankproject_add_artefacts.sh +23 -0
  11. data/documentation/scripts/create_myblankproject_add_artefacts_config.sh +28 -0
  12. data/documentation/scripts/create_mytemplateproject.sh +10 -0
  13. data/documentation/scripts/create_mytrainingproject.sh +10 -0
  14. data/documentation/scripts/generate_content_myblankproject.sh +25 -0
  15. data/documentation/scripts/generate_content_myblankproject_config.sh +28 -0
  16. data/documentation/scripts/generate_content_myblankproject_other_style.sh +29 -0
  17. data/documentation/scripts/generate_pdf_from_html.sh +36 -0
  18. data/documentation/scripts/generate_slideshow_deckjs.sh +18 -0
  19. data/documentation/scripts/generate_slideshow_mytoc_all.sh +17 -0
  20. data/documentation/scripts/generate_slideshow_mytoc_module.sh +10 -0
  21. data/documentation/scripts/generate_slideshow_revealjs.sh +23 -0
  22. data/documentation/scripts/generate_watch_mytrainingproject.sh +19 -0
  23. data/documentation/scripts/remove_temp_directories.sh +16 -0
  24. data/documentation/scripts/sendmail.sh +19 -0
  25. data/hyla.gemspec +4 -4
  26. data/lib/hyla/commands/create.rb +4 -4
  27. data/lib/hyla/commands/generate.rb +38 -22
  28. data/lib/hyla/commands/new.rb +5 -2
  29. data/lib/hyla/commands/sendmail.rb +2 -1
  30. data/lib/hyla/commands/serve.rb +2 -2
  31. data/lib/hyla/commands/watch.rb +10 -64
  32. data/lib/hyla/configuration.rb +9 -5
  33. data/lib/hyla/project.rb +1 -1
  34. data/lib/resources/styles/liberation.css +1 -0
  35. data/lib/templates/_config.yaml +72 -0
  36. data/lib/templates/sample/asciidoc_report.adoc +10 -48
  37. data/lib/templates/sample/asciidoc_source.adoc +7 -0
  38. data/lib/templates/sample/source/HelloWorld.java +11 -0
  39. data/test/reports/test-1.0.x-11-12-2013.txt +2 -2
  40. data/todo.adoc +0 -28
  41. metadata +1286 -444
  42. data/data/chm-status-weeks-0601-1001.html +0 -913
  43. data/lib/templates/_config.yml +0 -27
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTIwOTg4YjcxOWI4ZTRhNjUwMDg3Yzk2YjE3NjIxNTgwZjFhODk0OA==
4
+ ZmU1MzBjMmY0NDBkYjhiMGYwNWY5Y2M2N2RhN2M5MmEzNWZjMTIxNg==
5
5
  data.tar.gz: !binary |-
6
- MTNjYjdjODA5ODRkNGZkOTk2ZmIyZmZlNGY3NGU0Zjk4NmJlYzk2Yg==
6
+ MzRhZjkyNzcwYTBiM2FiNDg5ODNmMTQ1ZWE2MTNhNDlhNDc1ODQwNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTY1ZjViYWMzODRkOTZkMGI1YTkzNWM2MDc5N2ZiNWZjMWFmZjMzNDk5NjI5
10
- MWI0NWY1MWU2Y2I0ZTNjMjFlZDI1ZDIyN2E0MTY5MjMxNzMwNjg1YjA5OGQ1
11
- YTU4Mzg2MTU0OWRlOThkOTM3MTNiNzI5OWY1ZDc4YmU3NjAwNWM=
9
+ OGU0ZTBlNDI4MTFkZjY2MTkwMGIzYTVkODI5NWQ0ZmI4NWUwODY5OGQ0NDlj
10
+ ODc4M2QyMTI4Mzc3YmM0NGFlZTZiMjcwYTZhZTAwMmY0NTEwODdkZWRmMGMy
11
+ MzZlYzUzNGM1NzFjYjg3MGJkMDc4ZjU0MDQ0YTY0YzM2ODQwOTU=
12
12
  data.tar.gz: !binary |-
13
- OWRlNzFmMjQ4Nzc2MDg5MDIzNmMwYjkxZGVhNzJiNWJmOTQyODRlMzNhN2Ji
14
- ZTM1OWE2OGFjMzc5YzEyMzMxYzNiZTM2ZjQ2MWIxNTdkNmJkZTdmM2ZlOTFm
15
- YzhhOTIzOTEzN2JlNjYxMmJmMjFjOGNmOTczM2ExZjQ3YzE1YjY=
13
+ MzYwOTg4MmVhYTBjNTk3MjYyYzBhYmNjZmQwM2FjZmEyYjc1OTQyNGEwZWY2
14
+ YjE0MjgzMTgyZGYxMWNjOTFmNzViMzFjZTA1YjJjNzJjM2NmMDRiMWVhYTZl
15
+ YTc5NzhkOWIwMGExNWI4ZGM4ZmZmNDk3ZDFiZWY3N2IxNWQwYjk=
data/.gitignore ADDED
@@ -0,0 +1,30 @@
1
+ *.gem
2
+ *.rbc
3
+ *.lock
4
+ /.config
5
+ /coverage/
6
+ /InstalledFiles
7
+ /pkg/
8
+ /spec/reports/
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ ## Documentation cache and generated files:
14
+ /.yardoc/
15
+ /_yardoc/
16
+ /doc/
17
+ /rdoc/
18
+
19
+ ## Environment normalisation:
20
+ /.bundle/
21
+ /lib/bundler/man/
22
+
23
+ # for a library or gem, you might want to ignore these files since the code is
24
+ # intended to run in multiple environments; otherwise, check them in:
25
+ # Gemfile.lock
26
+ # .ruby-version
27
+ # .ruby-gemset
28
+
29
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
30
+ .rvmrc
data/LICENSE.txt CHANGED
@@ -1,22 +1,13 @@
1
- Copyright (c) 2013 Charles Mouliard
1
+ Copyright (c) 2013-2014 Charles Mouliard
2
2
 
3
- MIT License
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
4
6
 
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
7
+ http://www.apache.org/licenses/LICENSE-2.0
12
8
 
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
data/README.adoc CHANGED
@@ -1,6 +1,11 @@
1
1
  :icons: font
2
2
  :date-uri:
3
- :linkatts:
3
+ :linkattrs:
4
+ :homepage: http://github.com/cmoulliard/hyla
5
+ :docs: https://github.com/cmoulliard/hyla/blob/master/documentation/introduction.adoc
6
+ :sources: https://github.com/cmoulliard/hyla
7
+ :issues: https://github.com/cmoulliard/hyla/issues/
8
+ :license: https://github.com/cmoulliard/hyla/blob/master/LICENSE.txt
4
9
 
5
10
  image:https://raw.github.com/cmoulliard/hyla/master/documentation/image/hyla_frog.jpg[Hyla, 100, 100, role="left"] **Hyla** is a Ruby command line tool to create a new
6
11
  documentation/training/blog/static web site project, add artefacts (articles, blog, audio, video, content, code source, ...), render it in HTML, SlideShow, ... using asciidoc(tor) as markup language.
@@ -35,18 +40,24 @@ The Hyla project name comes from an arboreal http://en.wikipedia.org/wiki/Hyla[f
35
40
 
36
41
  == Prerequisites
37
42
 
38
- - https://www.ruby-lang.org/en/[Ruby] > 1.9.3
39
- - http://guides.rubygems.org/[RubyGems] to install Ruby Applications
43
+ - https://github.com/sstephenson/ruby-build#readme[rbenv-build] which let you to deploy a pre-compiled version of Ruby
40
44
  - https://github.com/sstephenson/rbenv[rbenv] to manage different versions of Ruby
45
+ - https://www.ruby-lang.org/en/[Ruby] 1.9.3-p484
46
+ - http://guides.rubygems.org/[RubyGems] to install Ruby Applications
47
+ - http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions-[How do I install and use the browser extensions for LiveReload].
48
+ Be sure to enable the option “Allow access to file URLs” checkbox in Tools > Extensions > LiveReload after installation of Chrome Extension.
49
+
50
+ image::image/access_local_file.png[Access Local File,650,150]
41
51
 
42
52
  == Installation
43
53
 
54
+ The latest source code is located in the {sources}[Hyla git repository] on GitHub. Hyla can be installed via the +gem+ command, bundler.
55
+
44
56
  Use `gem install` command to deploy Hyla :
45
57
 
46
58
  $ gem install hyla -y
47
59
 
48
60
  NOTE : The option `-y` will tell to rubyGems to deploy the gem but also the dependencies required
49
-
50
61
 
51
62
  An alternative is to create a Gemfile and add this line :
52
63
 
@@ -58,7 +69,7 @@ And then execute:
58
69
 
59
70
  **Or** install it yourself as:
60
71
 
61
- $ gem install hyla -v 1.0.1
72
+ $ gem install hyla -v 1.0.2
62
73
 
63
74
  == For Developer's only
64
75
 
@@ -90,15 +101,65 @@ More info about options and commands available can be find by running the `comma
90
101
 
91
102
  == Documentation
92
103
 
93
- The `hyla`documentation is available at the link:documentation/introduction.adoc[following address]
104
+ The `hyla` documentation is available at the link:documentation/introduction.adoc[following address]
105
+
106
+ == Copyright and Licensing
107
+
108
+ Copyright (C) 2013-2014 Charles Moulliard
109
+ Free use of this software is granted under the terms of the Apache License.
110
+
111
+ See the {license}[LICENSE] file for details.
112
+
113
+ == Authors
114
+
115
+ *Hyla* was written by https://github.com/cmoulliard[Charles Moulliard]
116
+
117
+ == Contact and Help
118
+
119
+ Home:: {homepage}
120
+ Docs:: {docs}
121
+ Source repository (git):: {sources}
122
+ Issue tracker (GitHub):: {issues}
123
+
124
+ == Changelog
125
+
126
+ === v1.0.3 - @cmoulliard
127
+
128
+ New Features::
94
129
 
130
+ Bug fixes::
95
131
 
132
+ * Change command option to use as symbol the attribute '-' for the one letter and not '--' for the full name. Example -f --file"
133
+ * Embedded image is not displayed with html attached (link:{issues}30[#30])
134
+ * Typo error - missing white space between title and level (link:{issues}33[#33])
135
+ * -st parameter is not supported by commander (link:{issues}32[#32])
96
136
 
137
+ Enhancements / Improvements::
97
138
 
139
+ * Refactor command watch to support to use _confg.yaml file (link:{issues}??[#??])
140
+ * Pass as parameter the thread variable - Thread.kill(@t)
141
+ * Refactor `serve` command to allow to have parameters in _config.yaml file
142
+ * Clean up report template
143
+ * Refactor _config.yaml to provide more info on options (link:{issues}31[#31])
144
+ * Check gem required (link:{issues}10[#10])
145
+ * Add shell scripts to play with different scenario (link:{issues}34[#34])
146
+ * Add example of code snippet (link:{issues}37[#37])
147
+ * Rename adoc2slide and index2slide to adoc2htmlslide, index2htmlslide (link:{issues}38[#38])
98
148
 
149
+ === v1.0.2 (2014-01-31) - @cmoulliard
99
150
 
151
+ New Features::
100
152
 
153
+ * PDF rendering option has been added - html2pdf (link:{issues}25[#25])
154
+ * Email as attachment HTML file generated by asciidoctor - (link:{issues}23[#23],link:{issues}21[#21])
155
+ * Support RevealJS as template backend for slideshow (link:{issues}29[#29])
101
156
 
157
+ Bug fixes::
102
158
 
159
+ * Watch option of the command line does not filter files correctly (link:{issues}28[#28])
160
+ * Rename require Hyla//WebSocket to require hyla/websocket
103
161
 
162
+ Enhancements / Improvements::
104
163
 
164
+ * Rename redhat to liberation
165
+ * Add comment and link to install LiveReload, fixed issue (link:{issues}28[#28])
data/bin/hyla CHANGED
@@ -18,27 +18,30 @@ program :description, Hyla::DESCRIPTION
18
18
  default_command :default
19
19
 
20
20
  def add_build_options(c)
21
- c.option '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
22
- c.option '-V', '--verbose', 'Print verbose output.'
21
+ c.option '-c','--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
22
+ c.option '-V','--verbose', 'Print verbose output.'
23
23
  end
24
24
 
25
25
  def add_common_options(c)
26
- c.option '--s', '--source [DIR]', 'Source directory (defaults to ./)'
27
- c.option '--d', '--destination [DIR]', 'Destination directory (defaults to ./generated_content)'
26
+ c.option '-s', '--source [DIR]', String, 'Source directory (defaults to ./)'
27
+ c.option '-d', '--destination [DIR]', String, 'Destination directory (defaults to ./generated_content)'
28
28
  end
29
29
 
30
30
  #
31
31
  # Creates a new Hyla project using a template or blank to the PATH specified
32
32
  #
33
33
  command :new do |c|
34
- c.syntax = 'hyla new PATH [options]'
34
+ c.syntax = 'hyla new [options]'
35
35
  c.description = 'Creates a new Hyla project using a template or blank to the PATH specified'
36
- c.option '--f','--force', 'Force creation even if PATH already exists'
37
- c.option '--b','--blank', 'Creates project but with empty files'
38
- c.option '--t','--template_type TEMPLATE_TYPE', String, 'Template Type to be used (documentation, book, training, training-exercises, blog, web, ...)'
36
+ c.option '-f','--force', 'Force creation even if PATH already exists'
37
+ c.option '-b','--blank', 'Creates project but with empty files'
38
+ c.option '-','--template_type [TEMPLATE_TYPE]', String, 'Template Type to be used (documentation, book, training, training-exercises, blog, web, ...)'
39
+
40
+ add_common_options(c)
39
41
 
40
42
  c.action do |args, options|
41
- Hyla::Commands::New.process(args, options.__hash__)
43
+ config = Hyla::Configuration.parse(options.__hash__)
44
+ Hyla::Commands::New.process(args, config)
42
45
  end
43
46
  end
44
47
 
@@ -46,9 +49,9 @@ end
46
49
  # Creates a new file from an artefact within an existing project
47
50
  #
48
51
  command :create do |c|
49
- c.syntax = 'hyla create ARTEFACT TYPE [options]'
52
+ c.syntax = 'hyla create [options]'
50
53
  c.description = 'Creates a new file from asciidoc artefact for an existing project'
51
- c.option '--a', '--artefact_type [ARTEFACT_TYPE]', String, 'Artefact Type : article, audio, video, blog entry ...'
54
+ c.option '-a', '--artefact_type [ARTEFACT_TYPE]', String, 'Artefact Type : article, audio, video, blog entry ...'
52
55
  c.option '--t', '--type [TYPE]', String, 'Type : asciidoc, slideshow'
53
56
 
54
57
  add_common_options(c)
@@ -65,13 +68,13 @@ end
65
68
  command :generate do |c|
66
69
  c.syntax = 'hyla generate [OPTIONS]'
67
70
  c.description = 'Generate content from asciidoc files (Table Of Content, modules, ...) to HTML, Slideshow'
68
- c.option '--b', '--backend [BACKEND]', String, 'Backend to be used : HTML5, deckjs, revealjs, ...'
71
+ c.option '-b', '--backend [BACKEND]', String, 'Backend to be used : HTML5, deckjs, revealjs, ...'
69
72
  c.option '-f', '--file [HTML FILE]', String, 'HTML File name'
70
- c.option '--p', '--project_name [PROJECT_NAME]', String, 'Project Name'
71
- c.option '--r', '--rendering [RENDERING]', String, 'Code of the rendering : adoc2html, adoc2slide, toc2adoc, index2slide'
73
+ c.option '-p', '--project_name [PROJECT_NAME]', String, 'Project Name'
74
+ c.option '-r', '--rendering [RENDERING]', String, 'Code of the rendering : adoc2html, adoc2htmlslide, toc2adoc, index2htmlslide, html2pdf'
72
75
  c.option '--t', '--toc [PATH]', String, 'File Path of the asciidoc file containing the Table of Content'
73
- c.option '--st', '--style [STYLE]', String, 'Stylesheet theme to be applied : asciidoctor, liberation, github, colony, foundation, ...'
74
- c.option '--a', '--attributes [KEY=VALUE,KEY=VALUE]', String, 'Asciidoctor attributes'
76
+ c.option '-y', '--style [STYLE]', String, 'Stylesheet theme to be applied : asciidoctor, liberation, github, colony, foundation, ...'
77
+ c.option '-a', '--attributes [KEY=VALUE,KEY=VALUE]', String, 'Asciidoctor attributes'
75
78
 
76
79
  add_common_options(c)
77
80
 
@@ -89,12 +92,11 @@ command :watch do |c|
89
92
 
90
93
  c.action do |args, options|
91
94
 
92
- options.default :serving => true
93
-
94
95
  # TODO Find if it is possible to watch files, generate HTML content - asciidoctor, expose content using HTTPServer and expose WebSocket - LiveReload
95
96
  # as they are started in 2 different threads, this is not possible with existing code
96
97
  # Hyla::Commands::Serve.process(args,options.__hash__)
97
- Hyla::Commands::Watch.process(args, options.__hash__)
98
+ config = Hyla::Configuration.parse(options.__hash__)
99
+ Hyla::Commands::Watch.process(args, config)
98
100
  end
99
101
  end
100
102
 
@@ -103,7 +105,7 @@ end
103
105
  command :serve do |c|
104
106
  c.syntax = 'hyla serve [options]'
105
107
  c.description = 'Serve your content locally'
106
- c.option '--out_dir DIR', String, 'Output directory where content must be generated'
108
+ c.option '-out_dir DIR', String, 'Output directory where content must be generated'
107
109
  c.option '-B', '--detach', 'Run the server in the background (detach)'
108
110
  c.option '-P', '--port [PORT]', 'Port to listen on'
109
111
  c.option '-H', '--host [HOST]', 'Host to bind to'
@@ -48,7 +48,7 @@ The Hyla project name comes from an arboreal http://en.wikipedia.org/wiki/Hyla[f
48
48
  - http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions-[How do I install and use the browser extensions for LiveReload].
49
49
  Be sure to enable the option “Allow access to file URLs” checkbox in Tools > Extensions > LiveReload after installation of Chrome Extension.
50
50
 
51
- image::image/access_local_file.png[Access Local File,600,150]
51
+ image::image/access_local_file.png[Access Local File,650,150]
52
52
 
53
53
  == Installation
54
54
 
@@ -56,7 +56,7 @@ Use `gem install` command to deploy Hyla :
56
56
 
57
57
  $ gem install hyla -y -v 1.0.x
58
58
 
59
- NOTE : The option `-y` will tell to rubyGems to deploy the gem but also the dependencies required
59
+ NOTE : The option `-y` will tell to rubyGems to deploy the gem but also the dependencies required
60
60
 
61
61
  NOTE : The option `-v` tells to gem installer to deploy a specific version / release. The release number will depend on the version available (1.0.1, 1.0.2, ...)
62
62
 
@@ -70,13 +70,15 @@ And then execute:
70
70
 
71
71
  **Or** install it yourself as:
72
72
 
73
- $ gem install hyla -v 1.0.1
73
+ $ gem install hyla -v _version_
74
+
75
+ where _version_ should be 1.0.2, 1.0.x
74
76
 
75
77
  == For Developer's only
76
78
 
77
79
  Clone Git project locally, move to Hyla directory and execute the following commands
78
80
  gem build hyla.gemspec
79
- gem install hyla-1.0.x.gem
81
+ gem install hyla-1.0.x
80
82
 
81
83
  == To publish Hyla to Gem Repo
82
84
 
@@ -101,6 +103,8 @@ More info about options and commands available can be find by running the `comma
101
103
 
102
104
  == Scenario
103
105
 
106
+ The following scenario describes how we can can setup a project using one of the option proposed by Hyla : Create, Generate, Watch, ...
107
+
104
108
  ==== 1. Delete Temp directory
105
109
 
106
110
  rm -rf ~/hyla/MyBlankProject/
@@ -111,12 +115,7 @@ More info about options and commands available can be find by running the `comma
111
115
  rm -rf ~/hyla/MyTrainingExercisesProject/
112
116
  rm -rf ~/hyla/MyDeckSlideShow/
113
117
  rm -rf ~/hyla/MyRevealSlideShow/
114
-
115
- ==== 2. Install Gem Hyla
116
-
117
- gem install hyla -v _version_
118
-
119
- where _version_ could be 1.0.1
118
+ rm -rf ~/hyla/MyEmailProject/
120
119
 
121
120
  == 1. Blank Project & Artefacts
122
121
 
@@ -137,21 +136,24 @@ Using hyla we will create a new project (= directory) and add artefacts (article
137
136
 
138
137
  - Create Asciidoc files from samples (book, article, image, audio, ...)
139
138
 
140
- hyla create --t asciidoc --a article --d ~/hyla/MyBlankProject
141
- hyla create --t asciidoc --a book --d ~/hyla/MyBlankProject
142
- hyla create --t asciidoc --a image --d ~/hyla/MyBlankProject
143
- hyla create --t asciidoc --a audio --d ~/hyla/MyBlankProject
144
- hyla create --t asciidoc --a video --d ~/hyla/MyBlankProject
145
- hyla create --t asciidoc --a source --d ~/hyla/MyBlankProject
146
- hyla create --t asciidoc --a table --d ~/hyla/MyBlankProject
139
+ hyla create --t asciidoc -a article -d ~/hyla/MyBlankProject
140
+ hyla create --t asciidoc -a book -d ~/hyla/MyBlankProject
141
+ hyla create --t asciidoc -a image -d ~/hyla/MyBlankProject
142
+ hyla create --t asciidoc -a audio -d ~/hyla/MyBlankProject
143
+ hyla create --t asciidoc -a video -d ~/hyla/MyBlankProject
144
+ hyla create --t asciidoc -a source -d ~/hyla/MyBlankProject
145
+ hyla create --t asciidoc -a table -d ~/hyla/MyBlankProject
147
146
 
148
147
  == 3. Create a Blank Project using _config.yaml config file, add artefacts
149
148
 
150
- - Clean and create a MyBlankProject (= directory) using --force option
149
+ - Clean up project and create a MyBlankProject (= directory) using --force option
151
150
 
152
151
  cd ~/hyla
153
152
  rm -rf MyBlankProject/
153
+
154
+ # Create a Blank project but containing the yaml config file
154
155
  hyla new --blank MyBlankProject --force
156
+
155
157
  cd MyBlankProject
156
158
 
157
159
  - Create Asciidoc files from samples (book, article, image, audio, ...)
@@ -166,28 +168,28 @@ Using hyla we will create a new project (= directory) and add artefacts (article
166
168
 
167
169
  === 4. Generate HTML Content of an existing project (asciidoc 2 html)
168
170
 
169
- hyla generate --r adoc2html --s ~/hyla/MyBlankProject/ --d ~/hyla/MyBlankProject/generated_content
171
+ hyla generate -r adoc2html -s ~/hyla/MyBlankProject/ -d ~/hyla/MyBlankProject/generated_content
170
172
 
171
173
  === 5. Generate HTML Content of an existing project (asciidoc 2 html) with a different style
172
174
 
173
175
  Styles available : liberation, asciidoctor, colony, foundation, foundation-lime, foundation-potion, github, golo, iconic, maker, readthedocs, riak, rocket-panda, rubygems
174
176
 
175
- hyla generate --r adoc2html --s ~/hyla/MyBlankProject/ --d ~/hyla/MyBlankProject/generated_content --style liberation
176
- hyla generate --r adoc2html --s ~/hyla/MyBlankProject/ --d ~/hyla/MyBlankProject/generated_content --style github
177
- hyla generate --r adoc2html --s ~/hyla/MyBlankProject/ --d ~/hyla/MyBlankProject/generated_content --style foundation
177
+ hyla generate -r adoc2html -s ~/hyla/MyBlankProject/ -d ~/hyla/MyBlankProject/generated_content --style liberation
178
+ hyla generate -r adoc2html -s ~/hyla/MyBlankProject/ -d ~/hyla/MyBlankProject/generated_content --style github
179
+ hyla generate -r adoc2html -s ~/hyla/MyBlankProject/ -d ~/hyla/MyBlankProject/generated_content --style foundation
178
180
 
179
181
  === 6. Generate HTML Content within project
180
182
 
181
- hyla generate --r adoc2html --s . --d generated_content
183
+ hyla generate -r adoc2html -s . -d generated_content
182
184
 
183
185
  === 7. Generate HTML Content within project & using Config File
184
186
 
185
187
  As destination directory is not longer '.' (which is the case when we add artefacts using `hyla create` command, then we must change the destination directory to `generated_content`. the original file is
186
188
  still available as it will backup by ruby
187
189
 
188
- ruby -i.bak -pe 'sub(%r{destination: .},"destination: generated_content")' _config.yml
190
+ ruby -i.bak -pe 'sub(%r{destination: .},"destination: generated_content")' _config.yaml
189
191
  hyla generate
190
- hyla generate --style foundation
192
+ hyla generate -y foundation
191
193
 
192
194
 
193
195
  == 2. Project from Template
@@ -206,16 +208,16 @@ Using hyla we will create a new project (= directory) and add artefacts (article
206
208
  === 2. Generate content and watch it
207
209
 
208
210
  cd ~/hyla/MyTrainingProject
209
- ruby -i.bak -pe 'sub(%r{destination: .},"destination: generated_content")' _config.yml
211
+ ruby -i.bak -pe 'sub(%r{destination: .},"destination: generated_content")' _config.yaml
210
212
  hyla generate
211
213
 
212
- hyla watch --s ~/hyla/MyTrainingProject/ --d ~/hyla/MyTrainingProject/generated_content
214
+ hyla watch -s ~/hyla/MyTrainingProject/ -d ~/hyla/MyTrainingProject/generated_content
213
215
 
214
216
  == 3. Table Of Content To asciidoc
215
217
 
216
218
  === 1. Generate an asciidoctor project from a Table of Content
217
219
 
218
- The entry point of a Documention site, Training, Publication or Book will consist most of the time to create
220
+ The entry point of a Documentation site, Training, Publication or Book will consist most of the time to create
219
221
  a Table Of Content which is a collection of modules with chapters that we will develop. As this process to elaborate
220
222
  the structure of the project will consume lot of time/effort, Hyla will simplify your life as it allows from a TOC file
221
223
 
@@ -244,8 +246,8 @@ slideshow presentation using as backend (DeckJS, DZSlides, ...) later on.
244
246
 
245
247
  - Generate asciidoc files from a Table Of Content (= collection of folders and files) and next HTML
246
248
 
247
- hyla generate --r toc2adoc --p my-project --d ~/hyla/MyTocProject/ --toc ~/MyProjects/hyla/data/toc.adoc
248
- hyla generate --r adoc2html --s ~/hyla/MyTocProject/ --d ~/hyla/MyTocProject/generated_content
249
+ hyla generate -r toc2adoc -p my-project -d ~/hyla/MyTocProject/ --toc ~/MyProjects/hyla/data/toc.adoc
250
+ hyla generate -r adoc2html -s ~/hyla/MyTocProject/ -d ~/hyla/MyTocProject/generated_content
249
251
 
250
252
  Example about what is generated
251
253
 
@@ -267,7 +269,7 @@ While you develop asciidoc(tor) documents, it is interesting to consult the file
267
269
  as a WebSocket server is exposed for the browser. To watch files and let's asciidoctor to render them, simply open a terminal and provide as
268
270
  parameter the source directory containing the files to be watched.
269
271
 
270
- hyla watch --s ~/hyla/MyTocProject/ --d ~/hyla/MyTocProject/generated_content
272
+ hyla watch -s ~/hyla/MyTocProject/ -d ~/hyla/MyTocProject/generated_content
271
273
 
272
274
  === 2. Generate an asciidoctor project from a Table of Content using YAML config file and watch content
273
275
 
@@ -279,20 +281,20 @@ as a WebSocket server is exposed for the browser. To watch files and let's ascii
279
281
 
280
282
  # Change destination in config files or pass info as option
281
283
  # cd ../MyTocProject/
282
- # subl _config.yml
283
- hyla generate --r adoc2html
284
+ # subl _config.yaml
285
+ hyla generate -r adoc2html
284
286
 
285
- hyla watch --s ~/hyla/MyTocProject/ --d generated_content
287
+ hyla watch -s ~/hyla/MyTocProject/ -d generated_content
286
288
 
287
289
  === 3. Generate a DeckJS Slideshow for a module
288
290
 
289
291
  cd ~/hyla/MyTocProject
290
- hyla generate --backend deckjs --s A_Introduction_module/ --d A_Introduction_module/generated_content --r index2slide
292
+ hyla generate --backend deckjs -s A_Introduction_module/ -d A_Introduction_module/generated_content -r index2htmlslide
291
293
 
292
294
  === 4. Generate a DeckJS Slideshow for a Project (all the TOC)
293
295
 
294
296
  cd ~/hyla/MyTocProject
295
- hyla generate --backend deckjs --s . --d generated_content --r index2slide --trace
297
+ hyla generate --backend deckjs -s . -d generated_content -r index2htmlslide
296
298
 
297
299
  == 5. Server content locally - HTTP Server
298
300
 
@@ -307,31 +309,31 @@ Hyla command in another Terminal
307
309
 
308
310
  rm -rf ~/hyla/MyDeckSlideShow
309
311
  cd ~/hyla
310
- hyla new --blank MyDeckSlideShow
312
+ hyla new -b -d MyDeckSlideShow
311
313
 
312
- hyla create --t slideshow --a deckjs --d MyDeckSlideShow
313
- hyla generate --backend deckjs --s ~/hyla/MyDeckSlideShow --d ~/hyla/MyDeckSlideShow/generated_content --r adoc2slide
314
+ hyla create --t slideshow -a deckjs -d MyDeckSlideShow
315
+ hyla generate --backend deckjs -s ~/hyla/MyDeckSlideShow -d ~/hyla/MyDeckSlideShow/generated_content -r adoc2htmlslide
314
316
 
315
317
  === 2. Different DeckJS Style options
316
318
 
317
- hyla generate --backend deckjs --s ~/hyla/MyDeckSlideShow --d ~/hyla/MyDeckSlideShow/generated_content --r index2slide --a deckjs_theme=swiss,deckjs_transition=fade
318
- hyla generate --backend deckjs --s ~/hyla/MyDeckSlideShow --d ~/hyla/MyDeckSlideShow/generated_content --r index2slide --a deckjs_theme=web-2.0,deckjs_transition=horizontal-slide
319
+ hyla generate --backend deckjs -s ~/hyla/MyDeckSlideShow -d ~/hyla/MyDeckSlideShow/generated_content -r adoc2htmlslide -a deckjs_theme=swiss,deckjs_transition=fade
320
+ hyla generate --backend deckjs -s ~/hyla/MyDeckSlideShow -d ~/hyla/MyDeckSlideShow/generated_content -r adoc2htmlslide -a deckjs_theme=web-2.0,deckjs_transition=horizontal-slide
319
321
 
320
322
  === 3. RevealJS
321
323
 
322
324
  rm -rf ~/hyla/MyRevealSlideShow
323
325
  cd ~/hyla
324
- hyla new --blank MyRevealSlideShow
326
+ hyla new --blank -d MyRevealSlideShow
325
327
 
326
- hyla create --t slideshow --a revealjs --d MyRevealSlideShow
328
+ hyla create --t slideshow -a revealjs -d MyRevealSlideShow
327
329
 
328
330
  cd MyRevealSlideShow
329
331
 
330
- hyla generate --backend revealjs --s . --d generated_content --r adoc2slide
332
+ hyla generate --backend revealjs -s . -d generated_content -r adoc2htmlslide
331
333
 
332
334
  open http://localhost:4000/hyla/slideshow_revealjs.html &
333
335
 
334
- hyla serve -P 4000 -H localhost -b /hyla/ --out_dir ~/hyla/MyRevealSlideShow/generated_content/
336
+ hyla serve -P 4000 -H localhost -b /hyla/ -d generated_content/
335
337
 
336
338
  == 7. Generate a PDF
337
339
 
@@ -342,17 +344,12 @@ libraries https://github.com/pdfkit/pdfkit[pdfkit] and https://github.com/wkhtml
342
344
 
343
345
  cd ~/hyla
344
346
  rm -rf MyPdfroject/
345
- hyla new --blank MyPdfProject --force
347
+ hyla new -b -d MyPdfProject --force
346
348
  cd MyPdfProject
347
349
 
348
- - Create 2 Asciidoc files from samples (book, image)
349
-
350
- hyla create --a book
351
- hyla create --a image
352
-
353
- - Change destination firm local '.' to 'generated_content'
350
+ - Create Asciidoc file from sample (book)
354
351
 
355
- ruby -i.bak -pe 'sub(%r{destination: .},"destination: generated_content")' _config.yml
352
+ hyla create -a book --t asciidoc -d .
356
353
 
357
354
  - Generate HTML content using foundation stylesheet
358
355
 
@@ -360,12 +357,12 @@ libraries https://github.com/pdfkit/pdfkit[pdfkit] and https://github.com/wkhtml
360
357
 
361
358
  - We change the rendering from adoc2html to html2pdf
362
359
 
363
- ruby -i.bak -pe 'sub(%r{rendering: adoc2html},"rendering: html2pdf")' _config.yml
360
+ ruby -i.bak -pe 'sub(%r{rendering: adoc2html},"rendering: html2pdf")' _config.yaml
364
361
 
365
362
  - Source directory & Destination directory
366
363
 
367
- ruby -i.bak -pe 'sub(%r{source: .},"source: ./generated_content")' _config.yml
368
- ruby -i.bak -pe 'sub(%r{destination: generated_content},"destination: ./generated_content/pdf")' _config.yml
364
+ ruby -i.bak -pe 'sub(%r{source: .},"source: ./generated_content")' _config.yaml
365
+ ruby -i.bak -pe 'sub(%r{destination: generated_content},"destination: ./generated_content/pdf")' _config.yaml
369
366
 
370
367
  - We will generate the PDF file for the image and book
371
368
 
@@ -403,14 +400,14 @@ Two new options are required to process the request on the command line or using
403
400
 
404
401
  cd ~/hyla
405
402
  rm -rf MyEmailProject/
406
- hyla new --blank MyEmailProject --force
403
+ hyla new -b -d MyEmailProject --force
407
404
  cd MyEmailProject
408
405
 
409
- - Edit the _config.yaml file and add the parameters required (see previously)
406
+ - Add an asciidoc file (report, doc, book, article)
410
407
 
411
- - Change destination firm local '.' to 'generated_content'
408
+ hyla create --a book --d .
412
409
 
413
- ruby -i.bak -pe 'sub(%r{destination: .},"destination: generated_content")' _config.yml
410
+ - Edit the _config.yaml file and add the parameters required (see previously)
414
411
 
415
412
  - Generate HTML content using foundation stylesheet
416
413