stepmod-utils 0.3.5 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +1 -1
  3. data/.github/workflows/release.yml +4 -3
  4. data/.rubocop.yml +1 -1
  5. data/Gemfile +3 -3
  6. data/Rakefile +1 -1
  7. data/exe/stepmod-annotate-all +17 -11
  8. data/exe/stepmod-build-resource-docs-cache +8 -7
  9. data/exe/stepmod-convert-express-description +6 -4
  10. data/exe/stepmod-convert-express-resource +6 -4
  11. data/exe/stepmod-extract-terms +38 -25
  12. data/exe/stepmod-find-express-files +8 -7
  13. data/lib/stepmod/utils/bibdata.rb +31 -35
  14. data/lib/stepmod/utils/cleaner.rb +3 -3
  15. data/lib/stepmod/utils/concept.rb +30 -35
  16. data/lib/stepmod/utils/converters/a.rb +7 -10
  17. data/lib/stepmod/utils/converters/blockquote.rb +4 -4
  18. data/lib/stepmod/utils/converters/br.rb +1 -1
  19. data/lib/stepmod/utils/converters/bypass.rb +33 -33
  20. data/lib/stepmod/utils/converters/clause_ref.rb +3 -3
  21. data/lib/stepmod/utils/converters/code.rb +1 -1
  22. data/lib/stepmod/utils/converters/comment.rb +5 -3
  23. data/lib/stepmod/utils/converters/dd.rb +2 -2
  24. data/lib/stepmod/utils/converters/def.rb +19 -19
  25. data/lib/stepmod/utils/converters/drop.rb +2 -2
  26. data/lib/stepmod/utils/converters/dt.rb +2 -2
  27. data/lib/stepmod/utils/converters/em.rb +1 -1
  28. data/lib/stepmod/utils/converters/em_express_description.rb +1 -1
  29. data/lib/stepmod/utils/converters/eqn.rb +28 -26
  30. data/lib/stepmod/utils/converters/example.rb +5 -6
  31. data/lib/stepmod/utils/converters/express_g.rb +10 -9
  32. data/lib/stepmod/utils/converters/express_ref.rb +2 -2
  33. data/lib/stepmod/utils/converters/express_ref_express_description.rb +3 -2
  34. data/lib/stepmod/utils/converters/ext_description.rb +1 -1
  35. data/lib/stepmod/utils/converters/figure.rb +3 -3
  36. data/lib/stepmod/utils/converters/fund_cons.rb +1 -1
  37. data/lib/stepmod/utils/converters/head.rb +3 -2
  38. data/lib/stepmod/utils/converters/hr.rb +2 -2
  39. data/lib/stepmod/utils/converters/ignore.rb +3 -3
  40. data/lib/stepmod/utils/converters/introduction.rb +1 -1
  41. data/lib/stepmod/utils/converters/module_ref.rb +6 -6
  42. data/lib/stepmod/utils/converters/note.rb +5 -6
  43. data/lib/stepmod/utils/converters/ol.rb +5 -5
  44. data/lib/stepmod/utils/converters/p.rb +2 -2
  45. data/lib/stepmod/utils/converters/pass_through.rb +2 -2
  46. data/lib/stepmod/utils/converters/q.rb +1 -1
  47. data/lib/stepmod/utils/converters/schema.rb +1 -1
  48. data/lib/stepmod/utils/converters/stem.rb +1 -1
  49. data/lib/stepmod/utils/converters/stepmod_ext_description.rb +5 -4
  50. data/lib/stepmod/utils/converters/strong.rb +5 -4
  51. data/lib/stepmod/utils/converters/sub.rb +2 -2
  52. data/lib/stepmod/utils/converters/sup.rb +2 -2
  53. data/lib/stepmod/utils/converters/synonym.rb +2 -2
  54. data/lib/stepmod/utils/converters/table.rb +7 -9
  55. data/lib/stepmod/utils/converters/term.rb +18 -9
  56. data/lib/stepmod/utils/converters/text.rb +11 -13
  57. data/lib/stepmod/utils/converters/uof.rb +3 -4
  58. data/lib/stepmod/utils/html_to_asciimath.rb +91 -90
  59. data/lib/stepmod/utils/smrl_description_converter.rb +34 -33
  60. data/lib/stepmod/utils/smrl_resource_converter.rb +50 -49
  61. data/lib/stepmod/utils/stepmod_definition_converter.rb +39 -38
  62. data/lib/stepmod/utils/stepmod_file_annotator.rb +26 -19
  63. data/lib/stepmod/utils/terms_extractor.rb +138 -86
  64. data/lib/stepmod/utils/version.rb +1 -1
  65. data/stepmod-utils.gemspec +11 -5
  66. metadata +71 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4b01b98d2e819f59adda9b7583eb65e0f3f17c67b57e297d4c63a28587a9c81
4
- data.tar.gz: 274c0b90422ffb4f51134c49c4b1f8b9b8d4319b4369fd26baccf6191cf11183
3
+ metadata.gz: 6411f597f1b4e65a05304e06d5d27a337113c6ddb003bb8bc574fb95bc2a7885
4
+ data.tar.gz: ab7abe00d931cf651c88223ce2eb37e9aab72780df7e2780691ca4aa7b4a2d8e
5
5
  SHA512:
6
- metadata.gz: 74483e26bbfdbb7dd5827ebf8d1b7270b13cf35765107830a7d5ce29239d4fa865804e6384ba092f7209fdc7ab91387f8841791822deb6da45d97f37d1621e82
7
- data.tar.gz: 9d130371dc91aa996896c79c3d3a7ff4be703d258030e9d2aee64212add70b79f8fdc9962c9d3d2d1d309d8e5c771817a22f44ff515f3702c014c859c9013dd0
6
+ metadata.gz: b66b9ac4aca80ac371459f3e36b9a3e4c8cb41faf90b5050af1709fac3a3013b0f44f05fd66fd1e64c322088ea52efa0995ffe047ee68961ca2dff00db3bc093
7
+ data.tar.gz: b8a99b3f0e5decee185aa5aa4400a418e4c29c431fea9a40428b5be18704a54a9cd640e6b44ef5065687588661b2e063a7a27f05be91ef41427f618547c14c60
@@ -16,7 +16,7 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '3.0', '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
22
  steps:
@@ -26,11 +26,12 @@ jobs:
26
26
 
27
27
  - run: gem install gem-release
28
28
 
29
- - if: ${{ github.event_name == 'workflow_dispatch' }} && ${{ github.event.inputs.next_version != 'skip' }}
30
- run: |
29
+ - run: |
31
30
  git config user.name github-actions
32
31
  git config user.email github-actions@github.com
33
- gem bump --version ${{ github.event.inputs.next_version }} --tag --push
32
+
33
+ - if: github.event_name == 'workflow_dispatch' && github.event.inputs.next_version != 'skip'
34
+ run: gem bump --version ${{ github.event.inputs.next_version }} --tag --push
34
35
 
35
36
  - name: publish to rubygems.org
36
37
  env:
data/.rubocop.yml CHANGED
@@ -7,4 +7,4 @@ inherit_from:
7
7
  # ...
8
8
 
9
9
  AllCops:
10
- TargetRubyVersion: 2.4
10
+ TargetRubyVersion: 2.5
data/Gemfile CHANGED
@@ -3,9 +3,9 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
6
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
7
7
 
8
+ gem "concurrent-ruby", "~> 1.1"
9
+ gem "pry"
8
10
  gem "rake", "~> 12.0"
9
11
  gem "rspec", "~> 3.0"
10
- gem "pry"
11
- gem "concurrent-ruby", "~> 1.1"
data/Rakefile CHANGED
@@ -3,4 +3,4 @@ require "rspec/core/rake_task"
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => :spec
6
+ task default: :spec
@@ -1,32 +1,38 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'concurrent'
4
- require 'stepmod/utils/stepmod_file_annotator'
3
+ require "concurrent"
4
+ require "stepmod/utils/stepmod_file_annotator"
5
5
 
6
6
  stepmod_dir = ARGV.first || Dir.pwd
7
7
 
8
8
  # build resource_docs cache
9
9
  resource_docs_cache_file = `mktemp`
10
- `"#{File.join(__dir__, 'stepmod-build-resource-docs-cache')}" "#{stepmod_dir}" > "#{resource_docs_cache_file}"`
10
+ `"#{File.join(__dir__,
11
+ "stepmod-build-resource-docs-cache")}" "#{stepmod_dir}" > "#{resource_docs_cache_file}"`
11
12
 
12
13
  # annotate each file
13
- files = `"#{File.join(__dir__, 'stepmod-find-express-files')}" "#{stepmod_dir}"`.strip.split("\n")
14
+ files = `"#{File.join(__dir__,
15
+ "stepmod-find-express-files")}" "#{stepmod_dir}"`.strip.split("\n")
14
16
  MAX_THREADS = [2, Concurrent.processor_count].max * 2
15
17
  MAX_QUEUE_SIZE = MAX_THREADS * 4
16
18
  # https://github.com/ruby-concurrency/concurrent-ruby/blob/master/docs-source/thread_pools.md
17
19
  pool = Concurrent::ThreadPoolExecutor.new(
18
- :min_threads => MAX_THREADS,
19
- :max_threads => MAX_THREADS,
20
- :max_queue => MAX_QUEUE_SIZE,
21
- :fallback_policy => :caller_runs
20
+ min_threads: MAX_THREADS,
21
+ max_threads: MAX_THREADS,
22
+ max_queue: MAX_QUEUE_SIZE,
23
+ fallback_policy: :caller_runs,
22
24
  )
23
25
  files.each_slice(MAX_QUEUE_SIZE) do |batch|
24
26
  puts("Queueing next batch")
25
27
  batch.each do |file|
26
28
  pool.post do
27
29
  puts("#{Thread.current.object_id}: Queued processing #{file}")
28
- annotated = Stepmod::Utils::StepmodFileAnnotator.new(express_file: file, resource_docs_cache_file: resource_docs_cache_file, stepmod_dir: stepmod_dir).call
29
- File.open(File.join(File.dirname(file), "#{File.basename(file, '.exp')}_annotated.exp"), 'w') do |file|
30
+ annotated = Stepmod::Utils::StepmodFileAnnotator.new(express_file: file,
31
+ resource_docs_cache_file: resource_docs_cache_file, stepmod_dir: stepmod_dir).call
32
+ File.open(
33
+ File.join(File.dirname(file),
34
+ "#{File.basename(file, '.exp')}_annotated.exp"), "w"
35
+ ) do |file|
30
36
  file.puts(annotated)
31
37
  end
32
38
  puts("#{Thread.current.object_id}: Done processing #{file}")
@@ -36,4 +42,4 @@ files.each_slice(MAX_QUEUE_SIZE) do |batch|
36
42
  end
37
43
 
38
44
  # cleanup
39
- `rm "#{resource_docs_cache_file}"`
45
+ `rm "#{resource_docs_cache_file}"`
@@ -1,19 +1,20 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'nokogiri'
4
- require 'json'
3
+ require "nokogiri"
4
+ require "json"
5
5
 
6
6
  stepmod_dir = ARGV.first || Dir.pwd
7
7
 
8
8
  schemas = {}
9
- Dir.glob(File.join(stepmod_dir, 'data/resource_docs/*/resource.xml')).each do |resource_docs_file|
10
- match = resource_docs_file.match('data/resource_docs/([^/]+)/resource.xml')
9
+ Dir.glob(File.join(stepmod_dir,
10
+ "data/resource_docs/*/resource.xml")).each do |resource_docs_file|
11
+ match = resource_docs_file.match("data/resource_docs/([^/]+)/resource.xml")
11
12
  resource_docs_dir = match.captures[0]
12
13
 
13
14
  resource_docs = Nokogiri::XML(File.read(resource_docs_file)).root
14
- resource_docs.xpath('schema').each do |schema|
15
- schemas[schema['name']] = resource_docs_dir
15
+ resource_docs.xpath("schema").each do |schema|
16
+ schemas[schema["name"]] = resource_docs_dir
16
17
  end
17
18
  end
18
19
 
19
- puts JSON.pretty_generate(schemas)
20
+ puts JSON.pretty_generate(schemas)
@@ -11,12 +11,14 @@ $:.unshift File.expand_path("../../lib", bin_file)
11
11
  # Fixes https://github.com/rubygems/rubygems/issues/1420
12
12
  require "rubygems/specification"
13
13
 
14
- class Gem::Specification
15
- def this; self; end
14
+ module Gem
15
+ class Specification
16
+ def this; self; end
17
+ end
16
18
  end
17
19
 
18
- require 'bundler/setup'
19
- require 'stepmod/utils/smrl_description_converter'
20
+ require "bundler/setup"
21
+ require "stepmod/utils/smrl_description_converter"
20
22
 
21
23
  ReverseAdoc.config.unknown_tags = :bypass
22
24
 
@@ -11,12 +11,14 @@ $:.unshift File.expand_path("../../lib", bin_file)
11
11
  # Fixes https://github.com/rubygems/rubygems/issues/1420
12
12
  require "rubygems/specification"
13
13
 
14
- class Gem::Specification
15
- def this; self; end
14
+ module Gem
15
+ class Specification
16
+ def this; self; end
17
+ end
16
18
  end
17
19
 
18
- require 'bundler/setup'
19
- require 'stepmod/utils/smrl_resource_converter'
20
+ require "bundler/setup"
21
+ require "stepmod/utils/smrl_resource_converter"
20
22
 
21
23
  ReverseAdoc.config.unknown_tags = :bypass
22
24
 
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: UTF-8
3
3
 
4
- require 'pry'
4
+ require "pry"
5
5
  # resolve bin path, ignoring symlinks
6
6
  require "pathname"
7
7
  bin_file = Pathname.new(__FILE__).realpath
@@ -12,12 +12,14 @@ $:.unshift File.expand_path("../../lib", bin_file)
12
12
  # Fixes https://github.com/rubygems/rubygems/issues/1420
13
13
  require "rubygems/specification"
14
14
 
15
- class Gem::Specification
16
- def this; self; end
15
+ module Gem
16
+ class Specification
17
+ def this; self; end
18
+ end
17
19
  end
18
20
 
19
- require 'bundler/setup'
20
- require 'stepmod/utils/terms_extractor'
21
+ require "bundler/setup"
22
+ require "stepmod/utils/terms_extractor"
21
23
 
22
24
  stepmod_dir = ARGV.first || Dir.pwd
23
25
 
@@ -51,37 +53,43 @@ def part_to_title(bibdata)
51
53
  end
52
54
  end
53
55
 
54
- def log message
56
+ def log(message)
55
57
  puts "[stepmod-utils] #{message}"
56
58
  end
57
59
 
58
60
  part_concepts.each do |(bibdata, current_part_concepts)|
61
+ current_part_concepts = current_part_concepts.to_a.map do |n|
62
+ n.localizations["en"]
63
+ end
59
64
  fn = "03x-stepmod-#{bibdata.part}.adoc"
60
- File.open(fn, 'w') { |file|
65
+ File.open(fn, "w") do |file|
61
66
  file.puts("== #{part_to_title(bibdata)}\n\n")
62
67
  file.puts(current_part_concepts.map(&:to_mn_adoc).join("\n"))
63
- }
68
+ end
64
69
  log "INFO: written to: #{fn}"
65
70
  end
66
71
 
67
-
68
72
  part_resources.each do |(bibdata, current_part_resources)|
73
+ current_part_resources = current_part_resources.to_a.map do |n|
74
+ n.localizations["en"]
75
+ end
69
76
  fn = "04x-stepmod-entities-resources-#{bibdata.part}.adoc"
70
- File.open(fn, 'w') { |file|
77
+ File.open(fn, "w") do |file|
71
78
  file.puts("== #{part_to_title(bibdata)}\n\n")
72
79
  file.puts(current_part_resources.map(&:to_mn_adoc).join("\n"))
73
- }
80
+ end
74
81
  log "INFO: written to: #{fn}"
75
82
  end
76
83
 
77
-
78
84
  part_modules.each do |(bibdata, part_modules_arm, part_modules_mim)|
79
85
  fn = "05x-stepmod-entities-modules-#{bibdata.part}.adoc"
80
- File.open(fn, 'w') { |file|
86
+ File.open(fn, "w") do |file|
81
87
  file.puts("")
82
88
  unless part_modules_arm.empty?
83
89
  schema_name = part_modules_arm.first.first
84
- concepts = part_modules_arm.first.last
90
+ concepts = part_modules_arm.first.last.to_a.map do |n|
91
+ n.localizations["en"]
92
+ end
85
93
 
86
94
  # puts "SCHEMA NAME ARM: #{schema_name}"
87
95
  file.puts("== #{schema_name}\n\n")
@@ -94,26 +102,31 @@ part_modules.each do |(bibdata, part_modules_arm, part_modules_mim)|
94
102
  schema_name = part_modules_mim.first.first
95
103
 
96
104
  # puts "SCHEMA NAME MIM: #{schema_name}"
97
- concepts = part_modules_mim.first.last
105
+ concepts = part_modules_mim.first.last.to_a.map do |n|
106
+ n.localizations["en"]
107
+ end
98
108
  file.puts("== #{schema_name}\n\n")
99
109
  file.puts(concepts.map(&:to_mn_adoc).join("\n"))
100
110
  end
101
-
102
- }
111
+ end
103
112
  log "INFO: written to: #{fn}"
104
113
  end
105
114
 
106
- File.open('031-stepmod-general.adoc', 'w') { |file|
107
- file.puts(general_concepts.map(&:to_mn_adoc).join("\n"))
108
- }
115
+ File.open("031-stepmod-general.adoc", "w") do |file|
116
+ file.puts(general_concepts.to_a.map do |n|
117
+ n.localizations["en"]
118
+ end.map(&:to_mn_adoc).join("\n"))
119
+ end
109
120
  log "INFO: written to: 031-stepmod-general.adoc"
110
121
 
111
- File.open('041-stepmod-entities-resources.adoc', 'w') { |file|
112
- file.puts(resource_concepts.map(&:to_mn_adoc).join("\n"))
113
- }
122
+ File.open("041-stepmod-entities-resources.adoc", "w") do |file|
123
+ file.puts(resource_concepts.to_a.map do |n|
124
+ n.localizations["en"]
125
+ end.map(&:to_mn_adoc).join("\n"))
126
+ end
114
127
  log "INFO: written to: 041-stepmod-entities-resources.adoc"
115
128
 
116
- File.open('991-generated-bibliography.adoc', 'w') { |file|
129
+ File.open("991-generated-bibliography.adoc", "w") do |file|
117
130
  file.puts(parsed_bibliography.map(&:to_mn_adoc).sort.uniq.join("\n"))
118
- }
131
+ end
119
132
  log "INFO: written to: 991-generated-bibliography.adoc"
@@ -1,23 +1,24 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'nokogiri'
3
+ require "nokogiri"
4
4
 
5
5
  stepmod_dir = ARGV.first || Dir.pwd
6
6
 
7
- index = Nokogiri::XML(File.read(File.join(stepmod_dir, 'repository_index.xml'))).root
7
+ index = Nokogiri::XML(File.read(File.join(stepmod_dir,
8
+ "repository_index.xml"))).root
8
9
 
9
10
  files = []
10
- index.xpath('modules/module').each do |item|
11
+ index.xpath("modules/module").each do |item|
11
12
  files << "#{stepmod_dir}/data/modules/#{item['name']}/arm.exp"
12
13
  files << "#{stepmod_dir}/data/modules/#{item['name']}/mim.exp"
13
14
  end
14
- index.xpath('resources/resource').each do |item|
15
+ index.xpath("resources/resource").each do |item|
15
16
  files << "#{stepmod_dir}/data/resources/#{item['name']}/#{item['name']}.exp"
16
17
  end
17
- index.xpath('business_object_models/business_object_model').each do |item|
18
+ index.xpath("business_object_models/business_object_model").each do |item|
18
19
  files << "#{stepmod_dir}/data/business_object_models/#{item['name']}/bom.exp"
19
20
  files << "#{stepmod_dir}/data/business_object_models/#{item['name']}/DomainModel.exp"
20
21
  end
21
22
 
22
- existing_files = files.filter{|file| File.exists?(file)}
23
- puts existing_files
23
+ existing_files = files.filter { |file| File.exists?(file) }
24
+ puts existing_files
@@ -1,8 +1,6 @@
1
1
  module Stepmod
2
2
  module Utils
3
-
4
3
  class Bibdata
5
-
6
4
  DOCNUMBER = 10303
7
5
 
8
6
  attr_accessor *%w(
@@ -15,23 +13,25 @@ module Stepmod
15
13
  # module, resource, application_protocol, business_object_model
16
14
  @type = document.name
17
15
 
18
- raise 'UnknownFileError' unless %w(module resource application_protocol business_object_model).include?(@type)
16
+ raise "UnknownFileError" unless %w(module resource
17
+ application_protocol business_object_model).include?(@type)
19
18
 
20
- @doctype = document['status']
21
- @part = document['part']
22
- @title_en = document['title'] ||
23
- document['name'].gsub('_', ' ').capitalize.gsub('2d','2D').gsub('3d','3D')
24
- @title_fr = document['name.french']
25
- @version = document['version']
26
- @language = document['language']
19
+ @doctype = document["status"]
20
+ @part = document["part"]
21
+ @title_en = document["title"] ||
22
+ document["name"].gsub("_", " ").capitalize.gsub("2d", "2D").gsub("3d",
23
+ "3D")
24
+ @title_fr = document["name.french"]
25
+ @version = document["version"]
26
+ @language = document["language"]
27
27
 
28
28
  # Some publication.year contains month...
29
- @pub_year = document['publication.year'].split('-').first
30
- @pub_date = document['publication.date']
29
+ @pub_year = document["publication.year"].split("-").first
30
+ @pub_date = document["publication.date"]
31
31
 
32
32
  # puts to_mn_adoc
33
33
 
34
- return self
34
+ self
35
35
  # <module
36
36
  # name="security_classification"
37
37
  # name.french="Classification des s&#233;curit&#233;s"
@@ -54,28 +54,27 @@ module Stepmod
54
54
  # rcs.revision="$Revision: 1.26 $"
55
55
  # development.folder="dvlp"
56
56
  # >
57
-
58
57
  end
59
58
 
60
59
  def docid
61
60
  no_date = case doctype
62
- when "IS"
63
- "ISO #{DOCNUMBER}-#{part}"
64
- when "WD"
65
- "ISO/WD #{DOCNUMBER}-#{part}"
66
- when "CD"
67
- "ISO/CD #{DOCNUMBER}-#{part}"
68
- when "DIS"
69
- "ISO/DIS #{DOCNUMBER}-#{part}"
70
- when "FDIS"
71
- "ISO/FDIS #{DOCNUMBER}-#{part}"
72
- when "TS"
73
- "ISO/TS #{DOCNUMBER}-#{part}"
74
- when "CD-TS"
75
- "ISO/CD TS #{DOCNUMBER}-#{part}"
76
- else
77
- "UNKNOWN DOCTYPE: (#{doctype})"
78
- end
61
+ when "IS"
62
+ "ISO #{DOCNUMBER}-#{part}"
63
+ when "WD"
64
+ "ISO/WD #{DOCNUMBER}-#{part}"
65
+ when "CD"
66
+ "ISO/CD #{DOCNUMBER}-#{part}"
67
+ when "DIS"
68
+ "ISO/DIS #{DOCNUMBER}-#{part}"
69
+ when "FDIS"
70
+ "ISO/FDIS #{DOCNUMBER}-#{part}"
71
+ when "TS"
72
+ "ISO/TS #{DOCNUMBER}-#{part}"
73
+ when "CD-TS"
74
+ "ISO/CD TS #{DOCNUMBER}-#{part}"
75
+ else
76
+ "UNKNOWN DOCTYPE: (#{doctype})"
77
+ end
79
78
 
80
79
  if pub_year
81
80
  "#{no_date}:#{pub_year}"
@@ -106,7 +105,7 @@ module Stepmod
106
105
  end
107
106
 
108
107
  def anchor
109
- docid.gsub('/', '-').gsub(' ', '_').gsub(':', '_')
108
+ docid.gsub("/", "-").gsub(" ", "_").gsub(":", "_")
110
109
  end
111
110
 
112
111
  def to_mn_adoc
@@ -116,9 +115,6 @@ module Stepmod
116
115
  "* [[[#{anchor},#{docid}]]]"
117
116
  end
118
117
  end
119
-
120
118
  end
121
-
122
119
  end
123
120
  end
124
-