stepmod-utils 0.6.7 → 0.6.9
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/.rubocop.yml +1 -1
- data/Gemfile +6 -3
- data/exe/stepmod-convert-express-description +1 -1
- data/exe/stepmod-convert-express-resource +1 -1
- data/lib/stepmod/utils/cleaner.rb +31 -2
- data/lib/stepmod/utils/concept.rb +33 -17
- data/lib/stepmod/utils/converters/a.rb +2 -2
- data/lib/stepmod/utils/converters/arm.rb +2 -2
- data/lib/stepmod/utils/converters/base.rb +3 -23
- data/lib/stepmod/utils/converters/clause_ref.rb +2 -2
- data/lib/stepmod/utils/converters/comment.rb +2 -2
- data/lib/stepmod/utils/converters/dd.rb +2 -2
- data/lib/stepmod/utils/converters/def.rb +3 -3
- data/lib/stepmod/utils/converters/definition.rb +2 -2
- data/lib/stepmod/utils/converters/description.rb +2 -2
- data/lib/stepmod/utils/converters/dl.rb +2 -2
- data/lib/stepmod/utils/converters/dt.rb +2 -2
- data/lib/stepmod/utils/converters/em.rb +3 -3
- data/lib/stepmod/utils/converters/em_express_description.rb +5 -3
- data/lib/stepmod/utils/converters/eqn.rb +3 -3
- data/lib/stepmod/utils/converters/example.rb +2 -2
- data/lib/stepmod/utils/converters/express_example.rb +0 -2
- data/lib/stepmod/utils/converters/express_figure.rb +3 -2
- data/lib/stepmod/utils/converters/express_g.rb +3 -3
- data/lib/stepmod/utils/converters/express_note.rb +2 -2
- data/lib/stepmod/utils/converters/express_ref.rb +2 -2
- data/lib/stepmod/utils/converters/express_ref_express_description.rb +3 -3
- data/lib/stepmod/utils/converters/express_table.rb +1 -2
- data/lib/stepmod/utils/converters/ext_description.rb +3 -2
- data/lib/stepmod/utils/converters/ext_descriptions.rb +3 -2
- data/lib/stepmod/utils/converters/figure.rb +10 -5
- data/lib/stepmod/utils/converters/fund_cons.rb +2 -2
- data/lib/stepmod/utils/converters/introduction.rb +2 -2
- data/lib/stepmod/utils/converters/li.rb +20 -0
- data/lib/stepmod/utils/converters/module_ref.rb +2 -2
- data/lib/stepmod/utils/converters/module_ref_express_description.rb +3 -3
- data/lib/stepmod/utils/converters/note.rb +2 -2
- data/lib/stepmod/utils/converters/ol.rb +9 -42
- data/lib/stepmod/utils/converters/pass_through.rb +1 -1
- data/lib/stepmod/utils/converters/resource.rb +2 -2
- data/lib/stepmod/utils/converters/schema.rb +2 -2
- data/lib/stepmod/utils/converters/schema_diag.rb +2 -2
- data/lib/stepmod/utils/converters/stepmod_ext_description.rb +3 -3
- data/lib/stepmod/utils/converters/strong.rb +3 -3
- data/lib/stepmod/utils/converters/sub.rb +9 -7
- data/lib/stepmod/utils/converters/sup.rb +9 -7
- data/lib/stepmod/utils/converters/synonym.rb +2 -2
- data/lib/stepmod/utils/converters/table.rb +3 -3
- data/lib/stepmod/utils/converters/term.rb +2 -2
- data/lib/stepmod/utils/converters/text.rb +3 -16
- data/lib/stepmod/utils/converters/tr.rb +17 -0
- data/lib/stepmod/utils/smrl_description_converter.rb +5 -13
- data/lib/stepmod/utils/smrl_resource_converter.rb +12 -20
- data/lib/stepmod/utils/stepmod_definition_converter.rb +19 -22
- data/lib/stepmod/utils/stepmod_file_annotator.rb +11 -11
- data/lib/stepmod/utils/term.rb +36 -14
- data/lib/stepmod/utils/terms_extractor.rb +17 -13
- data/lib/stepmod/utils/version.rb +1 -1
- data/stepmod-utils.gemspec +14 -17
- metadata +23 -75
- data/lib/stepmod/utils/converters/blockquote.rb +0 -20
- data/lib/stepmod/utils/converters/br.rb +0 -15
- data/lib/stepmod/utils/converters/bypass.rb +0 -81
- data/lib/stepmod/utils/converters/code.rb +0 -19
- data/lib/stepmod/utils/converters/drop.rb +0 -22
- data/lib/stepmod/utils/converters/head.rb +0 -23
- data/lib/stepmod/utils/converters/hr.rb +0 -15
- data/lib/stepmod/utils/converters/ignore.rb +0 -16
- data/lib/stepmod/utils/converters/p.rb +0 -21
- data/lib/stepmod/utils/converters/q.rb +0 -16
- data/lib/stepmod/utils/converters/stem.rb +0 -19
- data/lib/stepmod/utils/converters/uof.rb +0 -25
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Stepmod
|
4
|
-
module Utils
|
5
|
-
module Converters
|
6
|
-
class Hr < Stepmod::Utils::Converters::Base
|
7
|
-
def convert(_node, _state = {})
|
8
|
-
"\n* * *\n"
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
ReverseAdoc::Converters.register :hr, Hr.new
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Stepmod
|
4
|
-
module Utils
|
5
|
-
module Converters
|
6
|
-
class Ignore < Stepmod::Utils::Converters::Base
|
7
|
-
def convert(_node, _state = {})
|
8
|
-
"" # noop
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
ReverseAdoc::Converters.register :colgroup, Ignore.new
|
13
|
-
ReverseAdoc::Converters.register :col, Ignore.new
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Stepmod
|
4
|
-
module Utils
|
5
|
-
module Converters
|
6
|
-
class P < Stepmod::Utils::Converters::Base
|
7
|
-
def convert(node, state = {})
|
8
|
-
id = node["id"]
|
9
|
-
anchor = id ? "[[#{id}]]\n" : ""
|
10
|
-
if state[:tdsinglepara]
|
11
|
-
"#{anchor}#{treat_children(node, state).strip}"
|
12
|
-
else
|
13
|
-
"\n\n#{anchor}#{treat_children(node, state).strip}\n\n"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
ReverseAdoc::Converters.register :p, P.new
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Stepmod
|
4
|
-
module Utils
|
5
|
-
module Converters
|
6
|
-
class Q < Stepmod::Utils::Converters::Base
|
7
|
-
def convert(node, state = {})
|
8
|
-
content = treat_children(node, state)
|
9
|
-
"#{content[/^\s*/]}\"#{content.strip}\"#{content[/\s*$/]}"
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
ReverseAdoc::Converters.register :q, Q.new
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "stepmod/utils/converters/em"
|
4
|
-
|
5
|
-
module Stepmod
|
6
|
-
module Utils
|
7
|
-
module Converters
|
8
|
-
class Stem < Stepmod::Utils::Converters::Base
|
9
|
-
def convert(node, state = {})
|
10
|
-
return Em.new.convert(node, state) if node.text.strip.length > 8
|
11
|
-
|
12
|
-
" stem:[#{node.text.strip}] "
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
ReverseAdoc::Converters.register :i, Stem.new
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "stepmod/utils/converters/synonym"
|
4
|
-
|
5
|
-
module Stepmod
|
6
|
-
module Utils
|
7
|
-
module Converters
|
8
|
-
class Uof < Stepmod::Utils::Converters::Base
|
9
|
-
def convert(_node, _state = {})
|
10
|
-
# WARNING: <uof> tag content is deprecated
|
11
|
-
""
|
12
|
-
|
13
|
-
#
|
14
|
-
# <<~TEXT
|
15
|
-
# === #{node['name'].strip}
|
16
|
-
|
17
|
-
# <ISO 10303 application module> #{treat_children(node, state).strip}
|
18
|
-
# TEXT
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
ReverseAdoc::Converters.register :uof, Uof.new
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|