stepmod-utils 0.3.9 → 0.3.10

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
  SHA256:
3
- metadata.gz: 8838f07a6b887ff87b6067b7a82b02e605bfc97c81ed345642b68c9d8d4e6a5b
4
- data.tar.gz: 213824aa6f2b832d941d6575005f7c43c60f5332a1c285f973efa05d52090b86
3
+ metadata.gz: 8c31735350e54a2aa7f6de9b0de749126887d48a8e1ce23fd56378c7a5319641
4
+ data.tar.gz: aa494232f4f3858ea26f3379f602888066a7d1b98abd6d3c5cccc415d24fc58b
5
5
  SHA512:
6
- metadata.gz: '088fe0671024dd6e5fb69960c379d52e25345546ba5f87b8167d37e26fd8315074ba7b7028757d610a1c18fffe560485cc65937157cad72a32445dfef836a415'
7
- data.tar.gz: 176cde1360b6f3a229c05eb50fe606892d106101dab6e3e7c1aafb15467602d9650107151a58eb9f3ac56a2f93411ccd3131e749a3974c247f6c4cdc76f5e414
6
+ metadata.gz: cb202b0ed3ca8ccc4a21c36e68a4135b06d2b136227caf9b5d6627dc706d85ab7b0c1396582f5d71f967e3a35c11884a6dc30256e91fedae0a0e2d9ca52c5db9
7
+ data.tar.gz: 8a221bd8da7e75cf5653dee02fe484fbf1ab648ac8a0929941497d170310a5585b506e769c2f7ee695d3f694848aab1c874e83a668cdf397db6751d6ee3ca0b9
@@ -85,6 +85,17 @@ part_concepts.each do |(bibdata, current_part_concepts)|
85
85
  log "INFO: written to: #{fn}"
86
86
  end
87
87
 
88
+ File.open("03x-stepmod.adoc", "w") do |file|
89
+ part_concepts.sort_by do |(bibdata, current_part_concepts)|
90
+ bibdata.part
91
+ end.each do |(bibdata, current_part_concepts)|
92
+ fn = "03x-stepmod-#{bibdata.part}.adoc"
93
+ file.puts("\ninclude::#{fn}[]\n")
94
+ end
95
+ end
96
+
97
+ log "INFO: written summary file to: 03x-stepmod.adoc"
98
+
88
99
  part_resources.each do |(bibdata, current_part_resources)|
89
100
  current_part_resources = current_part_resources.to_a.map do |n|
90
101
  n.localizations["en"]
@@ -97,6 +108,17 @@ part_resources.each do |(bibdata, current_part_resources)|
97
108
  log "INFO: written to: #{fn}"
98
109
  end
99
110
 
111
+ File.open("04x-stepmod-entities-resources.adoc", "w") do |file|
112
+ part_resources.sort_by do |(bibdata, current_part_resources)|
113
+ bibdata.part
114
+ end.each do |(bibdata, current_part_resources)|
115
+ fn = "04x-stepmod-entities-resources-#{bibdata.part}.adoc"
116
+ file.puts("\ninclude::#{fn}[]\n")
117
+ end
118
+ end
119
+
120
+ log "INFO: written summary file to: 04x-stepmod-entities-resources.adoc"
121
+
100
122
  part_modules.each do |(bibdata, part_modules_arm, part_modules_mim)|
101
123
  fn = "05x-stepmod-entities-modules-#{bibdata.part}.adoc"
102
124
  File.open(fn, "w") do |file|
@@ -128,6 +150,17 @@ part_modules.each do |(bibdata, part_modules_arm, part_modules_mim)|
128
150
  log "INFO: written to: #{fn}"
129
151
  end
130
152
 
153
+ File.open("05x-stepmod-entities-modules.adoc", "w") do |file|
154
+ part_modules.sort_by do |(bibdata, part_modules_arm, part_modules_mim)|
155
+ bibdata.part
156
+ end.each do |(bibdata, part_modules_arm, part_modules_mim)|
157
+ fn = "05x-stepmod-entities-modules-#{bibdata.part}.adoc"
158
+ file.puts("\ninclude::#{fn}[]\n")
159
+ end
160
+ end
161
+
162
+ log "INFO: written summary file to: 05x-stepmod-entities-modules.adoc"
163
+
131
164
  File.open("031-stepmod-general.adoc", "w") do |file|
132
165
  file.puts(
133
166
  replace_images(
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "uri"
4
-
5
3
  module Stepmod
6
4
  module Utils
7
5
  module Converters
@@ -31,9 +29,7 @@ module Stepmod
31
29
  name = title if name.empty?
32
30
  href = "link:#{href}" unless href.to_s&.match?(URI::DEFAULT_PARSER.make_regexp)
33
31
  link = "#{href}[#{name}]"
34
- # link.prepend(' ')
35
32
  " #{link}"
36
-
37
33
  end
38
34
  end
39
35
  end
@@ -13,10 +13,20 @@ module Stepmod
13
13
  child_text = treat_children(node, state).strip
14
14
  return nil if child_text.empty?
15
15
 
16
- # If it contains a list, don't split
17
- unless child_text =~ /\n\* /
16
+ # Unless the first paragraph ends with "between" and is followed by a
17
+ # list, don't split
18
+ first_child = child_text.split("\n").first
19
+
20
+ unless (
21
+ first_child =~ /between:?\s*\Z/ ||
22
+ first_child =~ /include:?\s*\Z/ ||
23
+ first_child =~ /of:?\s*\Z/ ||
24
+ first_child =~ /[:;]\s*\Z/
25
+ ) &&
26
+ child_text =~ /\n\n\*/
27
+
18
28
  # Only taking the first paragraph of the definition
19
- child_text = child_text.split("\n").first
29
+ child_text = first_child
20
30
  end
21
31
 
22
32
  # # Only taking the first sentence
@@ -1,5 +1,5 @@
1
1
  module Stepmod
2
2
  module Utils
3
- VERSION = "0.3.9".freeze
3
+ VERSION = "0.3.10".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stepmod-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-26 00:00:00.000000000 Z
11
+ date: 2021-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby