asciidoctor-dita-map 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dita-map/cli.rb +16 -10
- data/lib/dita-map/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4dd982c41b3653429b386ada97215adc7c1eaf82bfdd6415d116e974e3f2446c
|
|
4
|
+
data.tar.gz: b547c896716b562ad96393b4802ceeaf87bf8af26270e4e8ad1ab8427d8aec3e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 647f898eac5920a8d976136683065acaa8ed6173bf4cf245bbebfaf9e75381f3a222866ffd1532c343900ec2508d80e800750b3ac8ecd8592141f09e5678c773
|
|
7
|
+
data.tar.gz: be60464080a6f54e249dd3432e8313486d3afe9298c02a5448502e5ac9ecd33cf02d943268459698d8a2ed9f12d4962f53d7caf7d05f42026737e4af91a52067
|
data/lib/dita-map/cli.rb
CHANGED
|
@@ -35,6 +35,7 @@ module AsciidoctorDitaMap
|
|
|
35
35
|
@opts = {
|
|
36
36
|
:chunk => true,
|
|
37
37
|
:id => true,
|
|
38
|
+
:locktitle => true,
|
|
38
39
|
:navtitle => true,
|
|
39
40
|
:output => false,
|
|
40
41
|
:title => true,
|
|
@@ -89,6 +90,10 @@ module AsciidoctorDitaMap
|
|
|
89
90
|
@opts[:chunk] = false
|
|
90
91
|
end
|
|
91
92
|
|
|
93
|
+
opt.on('-L', '--no-locktitle', 'do not generate the locktitle attribute') do
|
|
94
|
+
@opts[:locktitle] = false
|
|
95
|
+
end
|
|
96
|
+
|
|
92
97
|
opt.on('-N', '--no-navtitle', 'do not generate the navtitle attribute') do
|
|
93
98
|
@opts[:navtitle] = false
|
|
94
99
|
end
|
|
@@ -103,14 +108,14 @@ module AsciidoctorDitaMap
|
|
|
103
108
|
|
|
104
109
|
opt.separator ''
|
|
105
110
|
|
|
106
|
-
opt.on('-z', '--zero-offset', 'allow include directives with zero leveloffset') do
|
|
107
|
-
@opts[:zero_offset] = true
|
|
108
|
-
end
|
|
109
|
-
|
|
110
111
|
opt.on('-v', '--verbose', 'report additional problems in the supplied files') do
|
|
111
112
|
@opts[:verbose] = true
|
|
112
113
|
end
|
|
113
114
|
|
|
115
|
+
opt.on('-z', '--zero-offset', 'allow include directives with zero leveloffset') do
|
|
116
|
+
@opts[:zero_offset] = true
|
|
117
|
+
end
|
|
118
|
+
|
|
114
119
|
opt.separator ''
|
|
115
120
|
|
|
116
121
|
opt.on('-h', '--help', 'display this help and exit') do
|
|
@@ -149,12 +154,13 @@ module AsciidoctorDitaMap
|
|
|
149
154
|
end
|
|
150
155
|
|
|
151
156
|
def compose_topicref_attributes file_info, title, type
|
|
152
|
-
target_file
|
|
153
|
-
attributes
|
|
154
|
-
attributes['navtitle']
|
|
155
|
-
attributes['
|
|
156
|
-
attributes['
|
|
157
|
-
attributes['
|
|
157
|
+
target_file = file_info[:target].sub(/\.adoc$/, '.dita')
|
|
158
|
+
attributes = { 'href' => target_file }
|
|
159
|
+
attributes['navtitle'] = title if @opts[:navtitle] and title
|
|
160
|
+
attributes['locktitle'] = 'yes' if @opts[:locktitle] and attributes['navtitle']
|
|
161
|
+
attributes['type'] = type if @opts[:type] and type and ['concept', 'reference', 'task'].include? type
|
|
162
|
+
attributes['chunk'] = file_info[:chunk] if @opts[:chunk] and file_info[:chunk]
|
|
163
|
+
attributes['toc'] = file_info[:toc] if @opts[:toc] and file_info[:toc]
|
|
158
164
|
|
|
159
165
|
return attributes
|
|
160
166
|
end
|
data/lib/dita-map/version.rb
CHANGED