ad_hoc_template 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ad_hoc_template.gemspec +1 -1
- data/lib/ad_hoc_template/command_line_interface.rb +53 -26
- data/lib/ad_hoc_template/config_manager.rb +129 -0
- data/lib/ad_hoc_template/default_tag_formatter.rb +6 -1
- data/lib/ad_hoc_template/entry_format_generator.rb +83 -12
- data/lib/ad_hoc_template/parser.rb +64 -59
- data/lib/ad_hoc_template/recipe_manager.rb +168 -0
- data/lib/ad_hoc_template/record_reader.rb +73 -16
- data/lib/ad_hoc_template/utils.rb +29 -0
- data/lib/ad_hoc_template/version.rb +1 -1
- data/lib/ad_hoc_template.rb +77 -25
- data/samples/en/inner_iteration/data.aht +21 -0
- data/samples/en/inner_iteration/data.csv +5 -0
- data/samples/en/inner_iteration/data.yaml +14 -0
- data/samples/en/inner_iteration/data2.yaml +14 -0
- data/samples/en/inner_iteration/for_csv.sh +3 -0
- data/samples/en/inner_iteration/template.html +18 -0
- data/samples/en/recipe/main.aht +9 -0
- data/samples/en/recipe/template.html +20 -0
- data/samples/for_recipe.sh +3 -0
- data/samples/ja/inner_iteration/data.aht +21 -0
- data/samples/ja/inner_iteration/data.csv +5 -0
- data/samples/ja/inner_iteration/data.yaml +14 -0
- data/samples/ja/inner_iteration/data2.yaml +14 -0
- data/samples/ja/inner_iteration/for_csv.sh +3 -0
- data/samples/ja/inner_iteration/template.html +18 -0
- data/samples/ja/recipe/main.aht +9 -0
- data/samples/ja/recipe/template.html +20 -0
- data/samples/recipe.yaml +34 -0
- data/spec/ad_hoc_template_spec.rb +71 -1
- data/spec/command_line_interface_spec.rb +105 -11
- data/spec/config_manager_spec.rb +142 -0
- data/spec/default_tag_formatter_spec.rb +13 -0
- data/spec/entry_format_generator_spec.rb +160 -17
- data/spec/parser_spec.rb +64 -20
- data/spec/recipe_manager_spec.rb +419 -0
- data/spec/record_reader_spec.rb +122 -1
- data/spec/test_data/en/inner_iteration/data.csv +5 -0
- data/spec/test_data/en/recipe/expected_result.html +32 -0
- data/spec/test_data/en/recipe/main.aht +9 -0
- data/spec/test_data/en/recipe/template.html +20 -0
- data/spec/test_data/ja/inner_iteration/data.csv +5 -0
- data/spec/test_data/ja/recipe/expected_result.html +32 -0
- data/spec/test_data/ja/recipe/main.aht +9 -0
- data/spec/test_data/ja/recipe/template.html +20 -0
- data/spec/test_data/recipe.yaml +34 -0
- metadata +47 -4
@@ -0,0 +1,20 @@
|
|
1
|
+
<h1><!--%h country %-->文学の著名な作家</h1>
|
2
|
+
|
3
|
+
<!--%iterate%-->authors:
|
4
|
+
<h2><!--%h name %--></h2>
|
5
|
+
|
6
|
+
<p>生年: <!--%h birth_year %--></p>
|
7
|
+
|
8
|
+
<table summary="<!--%h name %-->の著名な作品とその出版年のリスト">
|
9
|
+
<caption>著名な作品</caption>
|
10
|
+
<thead>
|
11
|
+
<tr><th scope="col">作品名</th><th scope="col">出版年</th></tr>
|
12
|
+
</thead>
|
13
|
+
<tbody>
|
14
|
+
<!--%iterate%-->works|name:
|
15
|
+
<tr><td><!--%h title %--></td><td><!--%h year %--></td></tr>
|
16
|
+
<!--%/iterate%-->
|
17
|
+
</tbody>
|
18
|
+
</table>
|
19
|
+
|
20
|
+
<!--%/iterate%-->
|
@@ -0,0 +1,34 @@
|
|
1
|
+
---
|
2
|
+
template: spec/test_data/en/recipe/template.html
|
3
|
+
tag_type: :xml_comment_like
|
4
|
+
template_encoding: UTF-8
|
5
|
+
data: spec/test_data/en/recipe/main.aht
|
6
|
+
data_format:
|
7
|
+
data_encoding: UTF-8
|
8
|
+
output_file: spec/test_data/en/recipe/result.html
|
9
|
+
blocks:
|
10
|
+
- label: "#authors"
|
11
|
+
data:
|
12
|
+
data_format:
|
13
|
+
data_encoding:
|
14
|
+
- label: "#authors|works|name"
|
15
|
+
data: spec/test_data/en/inner_iteration/data.csv
|
16
|
+
data_format:
|
17
|
+
data_encoding:
|
18
|
+
---
|
19
|
+
template: spec/test_data/ja/recipe/template.html
|
20
|
+
tag_type: :xml_comment_like
|
21
|
+
template_encoding: UTF-8
|
22
|
+
data: spec/test_data/ja/recipe/main.aht
|
23
|
+
data_format:
|
24
|
+
data_encoding:
|
25
|
+
output_file: spec/test_data/ja/recipe/result.html
|
26
|
+
blocks:
|
27
|
+
- label: "#authors"
|
28
|
+
data:
|
29
|
+
data_format:
|
30
|
+
data_encoding:
|
31
|
+
- label: "#authors|works|name"
|
32
|
+
data: spec/test_data/ja/inner_iteration/data.csv
|
33
|
+
data_format:
|
34
|
+
data_encoding:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ad_hoc_template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HASHIMOTO, Naoki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pseudohikiparser
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.0.
|
19
|
+
version: 0.0.6.develop
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.0.
|
26
|
+
version: 0.0.6.develop
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: optparse_plus
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,20 +100,52 @@ files:
|
|
100
100
|
- bin/ad_hoc_template
|
101
101
|
- lib/ad_hoc_template.rb
|
102
102
|
- lib/ad_hoc_template/command_line_interface.rb
|
103
|
+
- lib/ad_hoc_template/config_manager.rb
|
103
104
|
- lib/ad_hoc_template/default_tag_formatter.rb
|
104
105
|
- lib/ad_hoc_template/entry_format_generator.rb
|
105
106
|
- lib/ad_hoc_template/parser.rb
|
106
107
|
- lib/ad_hoc_template/pseudohiki_formatter.rb
|
108
|
+
- lib/ad_hoc_template/recipe_manager.rb
|
107
109
|
- lib/ad_hoc_template/record_reader.rb
|
110
|
+
- lib/ad_hoc_template/utils.rb
|
108
111
|
- lib/ad_hoc_template/version.rb
|
112
|
+
- samples/en/inner_iteration/data.aht
|
113
|
+
- samples/en/inner_iteration/data.csv
|
114
|
+
- samples/en/inner_iteration/data.yaml
|
115
|
+
- samples/en/inner_iteration/data2.yaml
|
116
|
+
- samples/en/inner_iteration/for_csv.sh
|
117
|
+
- samples/en/inner_iteration/template.html
|
118
|
+
- samples/en/recipe/main.aht
|
119
|
+
- samples/en/recipe/template.html
|
120
|
+
- samples/for_recipe.sh
|
121
|
+
- samples/ja/inner_iteration/data.aht
|
122
|
+
- samples/ja/inner_iteration/data.csv
|
123
|
+
- samples/ja/inner_iteration/data.yaml
|
124
|
+
- samples/ja/inner_iteration/data2.yaml
|
125
|
+
- samples/ja/inner_iteration/for_csv.sh
|
126
|
+
- samples/ja/inner_iteration/template.html
|
127
|
+
- samples/ja/recipe/main.aht
|
128
|
+
- samples/ja/recipe/template.html
|
129
|
+
- samples/recipe.yaml
|
109
130
|
- spec/ad_hoc_template_spec.rb
|
110
131
|
- spec/command_line_interface_spec.rb
|
132
|
+
- spec/config_manager_spec.rb
|
111
133
|
- spec/default_tag_formatter_spec.rb
|
112
134
|
- spec/entry_format_generator_spec.rb
|
113
135
|
- spec/parser_spec.rb
|
114
136
|
- spec/pseudohiki_formatter_spec.rb
|
137
|
+
- spec/recipe_manager_spec.rb
|
115
138
|
- spec/record_reader_spec.rb
|
116
139
|
- spec/spec_helper.rb
|
140
|
+
- spec/test_data/en/inner_iteration/data.csv
|
141
|
+
- spec/test_data/en/recipe/expected_result.html
|
142
|
+
- spec/test_data/en/recipe/main.aht
|
143
|
+
- spec/test_data/en/recipe/template.html
|
144
|
+
- spec/test_data/ja/inner_iteration/data.csv
|
145
|
+
- spec/test_data/ja/recipe/expected_result.html
|
146
|
+
- spec/test_data/ja/recipe/main.aht
|
147
|
+
- spec/test_data/ja/recipe/template.html
|
148
|
+
- spec/test_data/recipe.yaml
|
117
149
|
homepage: https://github.com/nico-hn/AdHocTemplate
|
118
150
|
licenses:
|
119
151
|
- MIT
|
@@ -141,9 +173,20 @@ summary: A tiny template processor
|
|
141
173
|
test_files:
|
142
174
|
- spec/ad_hoc_template_spec.rb
|
143
175
|
- spec/command_line_interface_spec.rb
|
176
|
+
- spec/config_manager_spec.rb
|
144
177
|
- spec/default_tag_formatter_spec.rb
|
145
178
|
- spec/entry_format_generator_spec.rb
|
146
179
|
- spec/parser_spec.rb
|
147
180
|
- spec/pseudohiki_formatter_spec.rb
|
181
|
+
- spec/recipe_manager_spec.rb
|
148
182
|
- spec/record_reader_spec.rb
|
149
183
|
- spec/spec_helper.rb
|
184
|
+
- spec/test_data/en/inner_iteration/data.csv
|
185
|
+
- spec/test_data/en/recipe/expected_result.html
|
186
|
+
- spec/test_data/en/recipe/main.aht
|
187
|
+
- spec/test_data/en/recipe/template.html
|
188
|
+
- spec/test_data/ja/inner_iteration/data.csv
|
189
|
+
- spec/test_data/ja/recipe/expected_result.html
|
190
|
+
- spec/test_data/ja/recipe/main.aht
|
191
|
+
- spec/test_data/ja/recipe/template.html
|
192
|
+
- spec/test_data/recipe.yaml
|