hyla 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +8 -8
  2. data/README.adoc +38 -3
  3. data/bin/hyla +21 -8
  4. data/data/toc.adoc +3 -3
  5. data/documentation/introduction.adoc +30 -26
  6. data/documentation/scripts/create_adoc_from_toc.sh +3 -0
  7. data/documentation/scripts/create_myblankproject_add_artefacts.sh +7 -7
  8. data/documentation/scripts/create_myblankproject_add_artefacts_config.sh +14 -8
  9. data/documentation/scripts/create_myblankproject_add_artefacts_my_config.sh +15 -0
  10. data/documentation/scripts/generate_content_myblankproject.sh +7 -7
  11. data/documentation/scripts/generate_content_myblankproject_config.sh +17 -11
  12. data/documentation/scripts/generate_content_myblankproject_other_style.sh +7 -7
  13. data/documentation/scripts/generate_pdf_from_html.sh +1 -1
  14. data/documentation/scripts/generate_slideshow_deckjs.sh +4 -4
  15. data/documentation/scripts/generate_slideshow_mytoc_all.sh +2 -2
  16. data/documentation/scripts/generate_slideshow_mytoc_module.sh +1 -1
  17. data/documentation/scripts/generate_slideshow_revealjs.sh +13 -4
  18. data/documentation/scripts/generate_slideshow_revealjs_config.sh +36 -0
  19. data/documentation/scripts/sendmail.sh +1 -1
  20. data/hyla.gemspec +2 -1
  21. data/lib/hyla.rb +2 -1
  22. data/lib/hyla/commands/{create.rb → add.rb} +18 -1
  23. data/lib/hyla/commands/generate.rb +215 -44
  24. data/lib/hyla/commands/new.rb +16 -9
  25. data/lib/hyla/commands/sendmail.rb +37 -13
  26. data/lib/hyla/commands/serve.rb +2 -2
  27. data/lib/hyla/configuration.rb +73 -33
  28. data/lib/hyla/core_ext.rb +11 -1
  29. data/lib/hyla/project.rb +1 -1
  30. data/lib/resources/backends/haml/revealjs/document.html.haml +9 -2
  31. data/lib/resources/backends/slim/html5/block_image.html.slim +1 -0
  32. data/lib/resources/backends/slim/html5/document.html.slim +18 -9
  33. data/lib/resources/backends/slim/revealjs/block_sidebar.html.slim +5 -5
  34. data/lib/resources/backends/slim/revealjs/document.html.slim +10 -2
  35. data/lib/resources/backends/slim/revealjs/section.html.slim +5 -1
  36. data/lib/resources/cover.slim +70 -0
  37. data/lib/resources/fonts/liberation/Sans-Bold.ttf +0 -0
  38. data/lib/resources/fonts/liberation/Sans-BoldItalic.ttf +0 -0
  39. data/lib/resources/fonts/liberation/Sans-Italic.ttf +0 -0
  40. data/lib/resources/fonts/liberation/Sans-Regular.ttf +0 -0
  41. data/lib/resources/revealjs/css/theme/gpe.css +225 -0
  42. data/lib/resources/styles/liberation.css +3 -1
  43. data/lib/templates/_config.yaml +26 -8
  44. data/lib/templates/book/readme.adoc +1 -1
  45. data/lib/templates/sample/{asciidoc_article.adoc → asciidoc_article.ad} +0 -0
  46. data/lib/templates/sample/{asciidoc_audio.adoc → asciidoc_audio.ad} +0 -0
  47. data/lib/templates/sample/{asciidoc_book.adoc → asciidoc_book.ad} +0 -0
  48. data/lib/templates/sample/{asciidoc_image.adoc → asciidoc_image.ad} +0 -0
  49. data/lib/templates/sample/{asciidoc_report.adoc → asciidoc_report.ad} +3 -2
  50. data/lib/templates/sample/{asciidoc_source.adoc → asciidoc_source.ad} +0 -0
  51. data/lib/templates/sample/{asciidoc_table.adoc → asciidoc_table.ad} +0 -0
  52. data/lib/templates/sample/{asciidoc_video.adoc → asciidoc_video.ad} +0 -0
  53. data/lib/templates/sample/{slideshow_deckjs.adoc → slideshow_deckjs.ad} +0 -0
  54. data/lib/templates/sample/{slideshow_revealjs.adoc → slideshow_revealjs.ad} +1 -1
  55. data/lib/templates/training-exercises/{README.md → README.ad} +0 -0
  56. data/lib/templates/training/readme.adoc +1 -1
  57. metadata +61 -32
  58. data/documentation/scripts/create_adoc_from_toc_config.sh +0 -24
  59. data/lib/resources/backends/slim/document.html.bk.slim +0 -335
  60. data/lib/resources/styles/redhat.css +0 -1
  61. data/test/reports/test-1.0.x-11-12-2013.txt +0 -123
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmU1MzBjMmY0NDBkYjhiMGYwNWY5Y2M2N2RhN2M5MmEzNWZjMTIxNg==
4
+ YmRkYTZmMjQ5NjFkMzQ2YThiZGYxMzdiYmNlZmY0OGVlMzVlN2Y3Yg==
5
5
  data.tar.gz: !binary |-
6
- MzRhZjkyNzcwYTBiM2FiNDg5ODNmMTQ1ZWE2MTNhNDlhNDc1ODQwNQ==
6
+ YzQyYTc0ZjQwZWJkNTYxNmQyODBlNDlmYWMzMzk1YzNmMDY3NzFmZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OGU0ZTBlNDI4MTFkZjY2MTkwMGIzYTVkODI5NWQ0ZmI4NWUwODY5OGQ0NDlj
10
- ODc4M2QyMTI4Mzc3YmM0NGFlZTZiMjcwYTZhZTAwMmY0NTEwODdkZWRmMGMy
11
- MzZlYzUzNGM1NzFjYjg3MGJkMDc4ZjU0MDQ0YTY0YzM2ODQwOTU=
9
+ ZDMzNTQ1Y2I3OGJlNGY2OGQ5OGU4MTgxYzdkODQ1ZGJkOTBmNTk5YzMyMjkz
10
+ N2FkMTAyMThmMDczMGE0NGNlMjdhODc1YjE0ZjY1ZGJkN2ZkYWM3ZjY1NmM0
11
+ MjBmMjQ2MzRhZjNhMGQxMGE1ZWE1YWVkMWVhMTAxOTg5NGFkOWQ=
12
12
  data.tar.gz: !binary |-
13
- MzYwOTg4MmVhYTBjNTk3MjYyYzBhYmNjZmQwM2FjZmEyYjc1OTQyNGEwZWY2
14
- YjE0MjgzMTgyZGYxMWNjOTFmNzViMzFjZTA1YjJjNzJjM2NmMDRiMWVhYTZl
15
- YTc5NzhkOWIwMGExNWI4ZGM4ZmZmNDk3ZDFiZWY3N2IxNWQwYjk=
13
+ MzIxMzE1ODc1MjE0YTI2NGFmMmI4MzE3ZDdkY2Q3ZDYyMmM3ZThkZjFjMWI1
14
+ YWIxYTc5ZTg4M2ExNmFlYWIzYWFjNmEwZWU4MGY0NTFmYzUyNzRmNmE3MTdi
15
+ YzgyMjFhOWJmZjVmZTY4YTQ0NzBiNTlmYWQyNmJkYzU5ZTY2MzQ=
data/README.adoc CHANGED
@@ -47,8 +47,6 @@ The Hyla project name comes from an arboreal http://en.wikipedia.org/wiki/Hyla[f
47
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
48
  Be sure to enable the option “Allow access to file URLs” checkbox in Tools > Extensions > LiveReload after installation of Chrome Extension.
49
49
 
50
- image::image/access_local_file.png[Access Local File,650,150]
51
-
52
50
  == Installation
53
51
 
54
52
  The latest source code is located in the {sources}[Hyla git repository] on GitHub. Hyla can be installed via the +gem+ command, bundler.
@@ -69,7 +67,7 @@ And then execute:
69
67
 
70
68
  **Or** install it yourself as:
71
69
 
72
- $ gem install hyla -v 1.0.2
70
+ $ gem install hyla -v 1.0.3
73
71
 
74
72
  == For Developer's only
75
73
 
@@ -123,6 +121,43 @@ Issue tracker (GitHub):: {issues}
123
121
 
124
122
  == Changelog
125
123
 
124
+ === v1.0.4 - @cmoulliard
125
+
126
+ New Features::
127
+
128
+ * Support footer with copyright (link:{issues}40[#40])
129
+ * Add a header with logo (link:{issues}40[#40])
130
+ * Create directory/folder containing `Liberation` fonts
131
+ * Allow to use a different config file (link:{issues}41[#41])
132
+ * aside, sidebar block (link:{issues}42[#42])
133
+ * Rename extension from .adoc to .ad for files generated by toc2adoc command
134
+ * Add a new rendering 'cover2png' (link:{issues}43[#43])
135
+ * Generate an index number for each file created by the TOC (link:{issues}44[#44])
136
+ * Use index text file to list the files to be included in the PDF (link:{issues}45[#45])
137
+
138
+ Bug fixes::
139
+
140
+ * Image of the header is not embedded in the HTML file generated
141
+ * Fix issue when no project_name is provided
142
+ * remove solid black border around the image
143
+
144
+ Enhancements / Improvements::
145
+
146
+ * Add option to support attachment (link:{issues}39[#39]) for email
147
+ * Revert modification to propose adoc2html instead of adoc2htmlslide (link:{issues}38[#38])
148
+ * Revert modification to propose index2html instead of index2htmlslide (link:{issues}38[#38])
149
+ * Change h2 font-size of revaljs backend (2.11em --> 2em)
150
+ * Left justified the slides of revealjs
151
+ * Change margin to use Reveal option margin: 0.2
152
+ * Refactor pdf rendering to allow to group HTML files, add a footer and banner
153
+ * Comment nofooter, noheader and stylesdir
154
+ * Add comment line for the attributes added for the TOC
155
+ * Remove pdf kit dependency
156
+ * Rename .adoc to .ad for files generated during toc2adoc rendering
157
+ * Add true to nofooter, noheader
158
+ * Rename `hyla create' command to 'hyla add`
159
+
160
+
126
161
  === v1.0.3 - @cmoulliard
127
162
 
128
163
  New Features::
data/bin/hyla CHANGED
@@ -18,7 +18,7 @@ program :description, Hyla::DESCRIPTION
18
18
  default_command :default
19
19
 
20
20
  def add_build_options(c)
21
- c.option '-c','--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
21
+ c.option '-c','--config CONFIG_FILE', String, 'Custom configuration file'
22
22
  c.option '-V','--verbose', 'Print verbose output.'
23
23
  end
24
24
 
@@ -35,9 +35,10 @@ command :new do |c|
35
35
  c.description = 'Creates a new Hyla project using a template or blank to the PATH specified'
36
36
  c.option '-f','--force', 'Force creation even if PATH already exists'
37
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, ...)'
38
+ c.option '--t','--template_type [TEMPLATE_TYPE]', String, 'Template Type to be used (documentation, book, training, training-exercises, blog, web, ...)'
39
39
 
40
40
  add_common_options(c)
41
+ add_build_options(c)
41
42
 
42
43
  c.action do |args, options|
43
44
  config = Hyla::Configuration.parse(options.__hash__)
@@ -48,17 +49,18 @@ end
48
49
  #
49
50
  # Creates a new file from an artefact within an existing project
50
51
  #
51
- command :create do |c|
52
- c.syntax = 'hyla create [options]'
53
- c.description = 'Creates a new file from asciidoc artefact for an existing project'
52
+ command :add do |c|
53
+ c.syntax = 'hyla add [options]'
54
+ c.description = 'Add a new file using one of the different asciidoc samples/artefacts'
54
55
  c.option '-a', '--artefact_type [ARTEFACT_TYPE]', String, 'Artefact Type : article, audio, video, blog entry ...'
55
56
  c.option '--t', '--type [TYPE]', String, 'Type : asciidoc, slideshow'
56
57
 
57
58
  add_common_options(c)
59
+ add_build_options(c)
58
60
 
59
61
  c.action do |args, options|
60
62
  config = Hyla::Configuration.parse(options.__hash__)
61
- Hyla::Commands::Create.process(args, config)
63
+ Hyla::Commands::Add.process(args, config)
62
64
  end
63
65
  end
64
66
 
@@ -71,12 +73,13 @@ command :generate do |c|
71
73
  c.option '-b', '--backend [BACKEND]', String, 'Backend to be used : HTML5, deckjs, revealjs, ...'
72
74
  c.option '-f', '--file [HTML FILE]', String, 'HTML File name'
73
75
  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'
76
+ c.option '-r', '--rendering [RENDERING]', String, 'Code of the rendering : adoc2html, index2html, html2pdf, toc2adoc'
75
77
  c.option '--t', '--toc [PATH]', String, 'File Path of the asciidoc file containing the Table of Content'
76
78
  c.option '-y', '--style [STYLE]', String, 'Stylesheet theme to be applied : asciidoctor, liberation, github, colony, foundation, ...'
77
79
  c.option '-a', '--attributes [KEY=VALUE,KEY=VALUE]', String, 'Asciidoctor attributes'
78
80
 
79
81
  add_common_options(c)
82
+ add_build_options(c)
80
83
 
81
84
  c.action do |args, options|
82
85
  config = Hyla::Configuration.parse(options.__hash__)
@@ -88,7 +91,9 @@ end
88
91
  command :watch do |c|
89
92
  c.syntax = 'hyla watch [options]'
90
93
  c.description = 'Watch directories for any change, add or file deleted and render document (HTML5)'
94
+
91
95
  add_common_options(c)
96
+ add_build_options(c)
92
97
 
93
98
  c.action do |args, options|
94
99
 
@@ -110,11 +115,14 @@ command :serve do |c|
110
115
  c.option '-P', '--port [PORT]', 'Port to listen on'
111
116
  c.option '-H', '--host [HOST]', 'Host to bind to'
112
117
  c.option '-b', '--baseurl [URL]', 'Base URL'
118
+
113
119
  add_common_options(c)
120
+ add_build_options(c)
114
121
 
115
122
  c.action do |args, options|
116
123
  options.default :serving => true
117
- Hyla::Commands::Serve.process(args, options.__hash__)
124
+ config = Hyla::Configuration.parse(options.__hash__)
125
+ Hyla::Commands::Serve.process(args, config)
118
126
  end
119
127
  end
120
128
  alias_command :server, :serve
@@ -127,11 +135,16 @@ command :sendmail do |c|
127
135
  c.description = 'Send as HTML Attachment an email to the SMTP Server defined'
128
136
  c.option '-f', '--file [File]', String, 'File to be attached'
129
137
  c.option '-l', '--location [PATH]', String, 'Directory containing file to be attached'
138
+ c.option '-a', '--attachment [boolean]', 'Attach to the email the HTML generated'
130
139
  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'
131
140
 
132
141
  add_common_options(c)
142
+ add_build_options(c)
133
143
 
134
144
  c.action do |args, options|
145
+
146
+ options.default :attachment => false
147
+
135
148
  config = Hyla::Configuration.parse(options.__hash__)
136
149
  Hyla::Commands::Sendmail.process(args, config)
137
150
  end
data/data/toc.adoc CHANGED
@@ -1,4 +1,4 @@
1
- = A. Introduction module
1
+ = 1. Introduction module
2
2
 
3
3
  >> This is the module 'A. Introduction'
4
4
 
@@ -28,7 +28,7 @@ This is a Section about ...
28
28
 
29
29
 
30
30
 
31
- = B. Instruction module
31
+ = 2. Instruction module
32
32
 
33
33
  >> This is the module 'B. Instruction module'
34
34
 
@@ -42,7 +42,7 @@ This is a Section about ...
42
42
 
43
43
 
44
44
 
45
- = C. Installation module
45
+ = 3. Installation module
46
46
 
47
47
  >> This is the module 'C. Installation module'
48
48
 
@@ -50,6 +50,10 @@ Be sure to enable the option “Allow access to file URLs” checkbox in Tools >
50
50
 
51
51
  image::image/access_local_file.png[Access Local File,650,150]
52
52
 
53
+ == Dependencies
54
+
55
+ - https://github.com/hakimel/reveal.js[RevealJS] - Version 2.6.1
56
+
53
57
  == Installation
54
58
 
55
59
  Use `gem install` command to deploy Hyla :
@@ -136,13 +140,13 @@ Using hyla we will create a new project (= directory) and add artefacts (article
136
140
 
137
141
  - Create Asciidoc files from samples (book, article, image, audio, ...)
138
142
 
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
143
+ hyla add --t asciidoc -a article -d ~/hyla/MyBlankProject
144
+ hyla add --t asciidoc -a book -d ~/hyla/MyBlankProject
145
+ hyla add --t asciidoc -a image -d ~/hyla/MyBlankProject
146
+ hyla add --t asciidoc -a audio -d ~/hyla/MyBlankProject
147
+ hyla add --t asciidoc -a video -d ~/hyla/MyBlankProject
148
+ hyla add --t asciidoc -a source -d ~/hyla/MyBlankProject
149
+ hyla add --t asciidoc -a table -d ~/hyla/MyBlankProject
146
150
 
147
151
  == 3. Create a Blank Project using _config.yaml config file, add artefacts
148
152
 
@@ -158,13 +162,13 @@ Using hyla we will create a new project (= directory) and add artefacts (article
158
162
 
159
163
  - Create Asciidoc files from samples (book, article, image, audio, ...)
160
164
 
161
- hyla create --a article
162
- hyla create --a book
163
- hyla create --a image
164
- hyla create --a audio
165
- hyla create --a video
166
- hyla create --a source
167
- hyla create --a table
165
+ hyla add --a article
166
+ hyla add --a book
167
+ hyla add --a image
168
+ hyla add --a audio
169
+ hyla add --a video
170
+ hyla add --a source
171
+ hyla add --a table
168
172
 
169
173
  === 4. Generate HTML Content of an existing project (asciidoc 2 html)
170
174
 
@@ -184,7 +188,7 @@ Using hyla we will create a new project (= directory) and add artefacts (article
184
188
 
185
189
  === 7. Generate HTML Content within project & using Config File
186
190
 
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
191
+ As destination directory is not longer '.' (which is the case when we add artefacts using `hyla add` command, then we must change the destination directory to `generated_content`. the original file is
188
192
  still available as it will backup by ruby
189
193
 
190
194
  ruby -i.bak -pe 'sub(%r{destination: .},"destination: generated_content")' _config.yaml
@@ -289,12 +293,12 @@ as a WebSocket server is exposed for the browser. To watch files and let's ascii
289
293
  === 3. Generate a DeckJS Slideshow for a module
290
294
 
291
295
  cd ~/hyla/MyTocProject
292
- hyla generate --backend deckjs -s A_Introduction_module/ -d A_Introduction_module/generated_content -r index2htmlslide
296
+ hyla generate --backend deckjs -s A_Introduction_module/ -d A_Introduction_module/generated_content -r index2html
293
297
 
294
298
  === 4. Generate a DeckJS Slideshow for a Project (all the TOC)
295
299
 
296
300
  cd ~/hyla/MyTocProject
297
- hyla generate --backend deckjs -s . -d generated_content -r index2htmlslide
301
+ hyla generate --backend deckjs -s . -d generated_content -r index2html
298
302
 
299
303
  == 5. Server content locally - HTTP Server
300
304
 
@@ -311,13 +315,13 @@ Hyla command in another Terminal
311
315
  cd ~/hyla
312
316
  hyla new -b -d MyDeckSlideShow
313
317
 
314
- hyla create --t slideshow -a deckjs -d MyDeckSlideShow
315
- hyla generate --backend deckjs -s ~/hyla/MyDeckSlideShow -d ~/hyla/MyDeckSlideShow/generated_content -r adoc2htmlslide
318
+ hyla add --t slideshow -a deckjs -d MyDeckSlideShow
319
+ hyla generate --backend deckjs -s ~/hyla/MyDeckSlideShow -d ~/hyla/MyDeckSlideShow/generated_content -r adoc2html
316
320
 
317
321
  === 2. Different DeckJS Style options
318
322
 
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
323
+ hyla generate --backend deckjs -s ~/hyla/MyDeckSlideShow -d ~/hyla/MyDeckSlideShow/generated_content -r adoc2html -a deckjs_theme=swiss,deckjs_transition=fade
324
+ hyla generate --backend deckjs -s ~/hyla/MyDeckSlideShow -d ~/hyla/MyDeckSlideShow/generated_content -r adoc2html -a deckjs_theme=web-2.0,deckjs_transition=horizontal-slide
321
325
 
322
326
  === 3. RevealJS
323
327
 
@@ -325,11 +329,11 @@ Hyla command in another Terminal
325
329
  cd ~/hyla
326
330
  hyla new --blank -d MyRevealSlideShow
327
331
 
328
- hyla create --t slideshow -a revealjs -d MyRevealSlideShow
332
+ hyla add --t slideshow -a revealjs -d MyRevealSlideShow
329
333
 
330
334
  cd MyRevealSlideShow
331
335
 
332
- hyla generate --backend revealjs -s . -d generated_content -r adoc2htmlslide
336
+ hyla generate --backend revealjs -s . -d generated_content -r adoc2html
333
337
 
334
338
  open http://localhost:4000/hyla/slideshow_revealjs.html &
335
339
 
@@ -349,7 +353,7 @@ libraries https://github.com/pdfkit/pdfkit[pdfkit] and https://github.com/wkhtml
349
353
 
350
354
  - Create Asciidoc file from sample (book)
351
355
 
352
- hyla create -a book --t asciidoc -d .
356
+ hyla add -a book --t asciidoc -d .
353
357
 
354
358
  - Generate HTML content using foundation stylesheet
355
359
 
@@ -393,7 +397,7 @@ file generated from an asciidoc file.
393
397
 
394
398
  Two new options are required to process the request on the command line or using _config.yaml file
395
399
 
396
- location: ./generated_content
400
+ source: ./generated_content
397
401
  file: name_of_html_file
398
402
 
399
403
  - Create a Blank project
@@ -405,7 +409,7 @@ Two new options are required to process the request on the command line or using
405
409
 
406
410
  - Add an asciidoc file (report, doc, book, article)
407
411
 
408
- hyla create --a book --d .
412
+ hyla add --a book --d .
409
413
 
410
414
  - Edit the _config.yaml file and add the parameters required (see previously)
411
415
 
@@ -13,6 +13,9 @@ fi
13
13
  echo "TOC file location : $1"
14
14
  echo "Project Name : $2"
15
15
 
16
+ cd ~/hyla
17
+ rm -rf $2/
18
+
16
19
  hyla generate -r toc2adoc -p my-project -d ~/hyla/$2/ --toc $1
17
20
  hyla generate -r adoc2html -s ~/hyla/$2/ -d ~/hyla/$2/generated_content
18
21
 
@@ -9,13 +9,13 @@ echo "Create a new Blank project"
9
9
  hyla new -b -d MyBlankProject --force
10
10
 
11
11
  echo "Add asciidoc files using artefacts and template"
12
- hyla create --t asciidoc --a article --d ~/hyla/MyBlankProject
13
- hyla create --t asciidoc --a book --d ~/hyla/MyBlankProject
14
- hyla create --t asciidoc --a image --d ~/hyla/MyBlankProject
15
- hyla create --t asciidoc --a audio --d ~/hyla/MyBlankProject
16
- hyla create --t asciidoc --a video --d ~/hyla/MyBlankProject
17
- hyla create --t asciidoc --a source --d ~/hyla/MyBlankProject
18
- hyla create --t asciidoc --a table --d ~/hyla/MyBlankProject
12
+ hyla add --t asciidoc --a article --d ~/hyla/MyBlankProject
13
+ hyla add --t asciidoc --a book --d ~/hyla/MyBlankProject
14
+ hyla add --t asciidoc --a image --d ~/hyla/MyBlankProject
15
+ hyla add --t asciidoc --a audio --d ~/hyla/MyBlankProject
16
+ hyla add --t asciidoc --a video --d ~/hyla/MyBlankProject
17
+ hyla add --t asciidoc --a source --d ~/hyla/MyBlankProject
18
+ hyla add --t asciidoc --a table --d ~/hyla/MyBlankProject
19
19
 
20
20
  echo "Project created"
21
21
  ls -la ~/hyla/MyBlankProject
@@ -9,14 +9,20 @@ cd MyBlankProject
9
9
 
10
10
  echo "Change destination parameter"
11
11
  ruby -i.bak -pe 'sub(%r{destination: generated_content},"destination: .")' _config.yaml
12
-
13
- hyla create --a article
14
- hyla create --a book
15
- hyla create --a image
16
- hyla create --a audio
17
- hyla create --a video
18
- hyla create --a source
19
- hyla create --a table
12
+ ruby -i.bak -pe 'sub(%r{# header_image_path: },"header_image_path: image/rhheader_thin.png ")' _config.yaml
13
+ ruby -i.bak -pe 'sub(%r{# footer_copyright: },"footer-copyright: Copyright ©2014 Red Hat, Inc.")' _config.yaml
14
+
15
+ hyla add --a article
16
+ hyla add --a book
17
+ hyla add --a image
18
+ hyla add --a audio
19
+ hyla add --a video
20
+ hyla add --a source
21
+ hyla add --a table
22
+
23
+ echo "Copy header file"
24
+ mkdir image
25
+ cp ~/hyla/RevealCreatedContent/images/rhheader_thin.png image/
20
26
 
21
27
  echo "Project created"
22
28
  ls -la ~/hyla/MyBlankProject
@@ -0,0 +1,15 @@
1
+ #!/bin/sh
2
+
3
+ source remove_temp_directories.sh
4
+
5
+ echo "Create a Blank project but containing the yaml config file"
6
+ cd ~/hyla
7
+ hyla new -b -d MyBlankProject --force
8
+ cd MyBlankProject
9
+
10
+ hyla add -a book -c ~/hyla/my_config_html.yaml
11
+
12
+ echo "Project created"
13
+ ls -la ~/hyla/MyBlankProject
14
+
15
+
@@ -11,13 +11,13 @@ echo "Backup _config.yaml file as we don't use it here"
11
11
  mv _config.yaml _config.yaml.bk
12
12
 
13
13
  echo "Add asciidoc files"
14
- hyla create --t asciidoc --a article --d ~/hyla/MyBlankProject
15
- hyla create --t asciidoc --a book --d ~/hyla/MyBlankProject
16
- hyla create --t asciidoc --a image --d ~/hyla/MyBlankProject
17
- hyla create --t asciidoc --a audio --d ~/hyla/MyBlankProject
18
- hyla create --t asciidoc --a video --d ~/hyla/MyBlankProject
19
- hyla create --t asciidoc --a source --d ~/hyla/MyBlankProject
20
- hyla create --t asciidoc --a table --d ~/hyla/MyBlankProject
14
+ hyla add --t asciidoc --a article --d ~/hyla/MyBlankProject
15
+ hyla add --t asciidoc --a book --d ~/hyla/MyBlankProject
16
+ hyla add --t asciidoc --a image --d ~/hyla/MyBlankProject
17
+ hyla add --t asciidoc --a audio --d ~/hyla/MyBlankProject
18
+ hyla add --t asciidoc --a video --d ~/hyla/MyBlankProject
19
+ hyla add --t asciidoc --a source --d ~/hyla/MyBlankProject
20
+ hyla add --t asciidoc --a table --d ~/hyla/MyBlankProject
21
21
 
22
22
  hyla generate -r adoc2html -s ~/hyla/MyBlankProject/ -d ~/hyla/MyBlankProject/generated_content
23
23
 
@@ -9,20 +9,26 @@ hyla new -b -d ~/hyla/MyBlankProject --force
9
9
  cd ~/hyla/MyBlankProject
10
10
 
11
11
  echo "Add asciidoc files"
12
- hyla new -b -d MyBlankProject --force
13
- hyla create --t asciidoc --a article --d ~/hyla/MyBlankProject
14
- hyla create --t asciidoc --a book --d ~/hyla/MyBlankProject
15
- hyla create --t asciidoc --a image --d ~/hyla/MyBlankProject
16
- hyla create --t asciidoc --a audio --d ~/hyla/MyBlankProject
17
- hyla create --t asciidoc --a video --d ~/hyla/MyBlankProject
18
- hyla create --t asciidoc --a source --d ~/hyla/MyBlankProject
19
- hyla create --t asciidoc --a table --d ~/hyla/MyBlankProject
12
+ hyla add --t asciidoc --a article --d ~/hyla/MyBlankProject
13
+ hyla add --t asciidoc --a book --d ~/hyla/MyBlankProject
14
+ hyla add --t asciidoc --a image --d ~/hyla/MyBlankProject
15
+ hyla add --t asciidoc --a audio --d ~/hyla/MyBlankProject
16
+ hyla add --t asciidoc --a video --d ~/hyla/MyBlankProject
17
+ hyla add --t asciidoc --a source --d ~/hyla/MyBlankProject
18
+ hyla add --t asciidoc --a table --d ~/hyla/MyBlankProject
20
19
 
21
20
  echo "Change style in the _config.yaml file"
22
- ruby -i.bak -pe 'sub(%r{style: liberation},"style: foundation")' _config.yaml
21
+ #ruby -i.bak -pe 'sub(%r{style: liberation},"style: foundation")' _config.yaml
22
+ ruby -i.bak -pe 'sub(%r{footer_copyright:},"footer_copyright: Copyright ©2014 Red Hat, Inc.")' _config.yaml
23
+ ruby -i.bak -pe 'sub(%r{header_image_path:},"header_image_path: image/rhheader_thin.png")' _config.yaml
24
+ ruby -i.bak -pe 'sub(%r{revealjs_theme:},"revealjs_theme: gpe")' _config.yaml
25
+
26
+ echo "Copy logo"
27
+ mkdir -p generated_content/image
28
+ cp /Users/chmoulli/hyla/RevealCreatedContent/image/rhheader_thin.png ./generated_content/image/
23
29
 
24
30
  echo "Generate HTML content"
25
31
  hyla generate
26
32
 
27
- echo "Revert style"
28
- ruby -i.bak -pe 'sub(%r{style: foundation},"style: liberation")' _config.yaml
33
+ #echo "Revert style"
34
+ #ruby -i.bak -pe 'sub(%r{style: foundation},"style: liberation")' _config.yaml