asciibuild 0.6.0 → 0.7.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d25e361a066c8441cf36861379f0fbd8267ca4b0
4
- data.tar.gz: 1ddd0ac9f4239d900eca176ee6476f8de099c82a
3
+ metadata.gz: ccdd4a203e5512865e5c825c5e39537c9162083b
4
+ data.tar.gz: a5860ec18800c6f722b43f72cd5ee4f2f071c747
5
5
  SHA512:
6
- metadata.gz: 6ad1c41326d6ac1581e7490c52161adee5be8aedf898088c82ec5aeb8eab7b6a53cfd650ac837343cb6ab525f459761ae7e19aac5866fb4b3e35811fb94e937e
7
- data.tar.gz: 38d9561df46e46c17d21a64f50181139726bef4d071af0c9ff35f03b4cd764eb350622f04ab9823e1a72f1a293863ce1488ecb4301acd41ba7ef17d8b8b41916
6
+ metadata.gz: 8f8e27146cc7f66ebc9d50a9620978216a884675c5ed79797402c59ea9b213c32114759ddaf1786d844e376a919a10efbcd1ce32a0371c4a951303a8b899f649
7
+ data.tar.gz: 52f25053be21efb06f44234a44e7f46422a807c0f3b3b5d28c277776951149e58240e102052621f96f59f2eae856b14b4d092a1320ab7e3c4bcb30d04fe024db
data/bin/asciibuild CHANGED
@@ -29,6 +29,9 @@ OptionParser.new do |opts|
29
29
  opts.on('-d', '--outdir DIR', 'Directory to output processed documents to') do |d|
30
30
  options[:to_dir] = d
31
31
  end
32
+ opts.on('-e', '--enabled ENABLED', 'Enable or disable asciibuild entirely') do |e|
33
+ attrs["enabled"] = e
34
+ end
32
35
  opts.on('-s', '--stylesheet NAME', 'Stylesheet name') do |v|
33
36
  attrs["stylesheet"] = find_stylesheet(v)
34
37
  end
@@ -204,10 +204,12 @@ module Asciibuild
204
204
  end
205
205
  attrs['original_title'] = attrs['title']
206
206
 
207
- if not include_section?(parent, attrs)
207
+ if not include_section?(parent, attrs) or parent.document.attributes["enabled"] == "false" or attrs["enabled"] == "false"
208
208
  if parent.document.attributes["error"]
209
209
  puts "Section \"#{parent.title}\" skipped due to previous error."
210
210
  attrs['title'] = 'icon:pause-circle[role=red] ' + attrs['title'] + " (previous error)"
211
+ elsif parent.document.attributes["enabled"] == "false" or attrs["enabled"] == "false"
212
+ puts "Section \"#{parent.title}\" not enabled."
211
213
  else
212
214
  sections = parent.document.attributes["sections"].split(/,[ ]*/)
213
215
  puts "Section \"#{parent.title}\" skipped. Does not match #{sections}."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciibuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Brisbin