tbx_importer 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea1d3cf7a18aa77555c18fca71ffc6536f540625
4
- data.tar.gz: 59a997f74522416585f255054db289c657a54197
3
+ metadata.gz: 2033921597c1fc81b125a26dc8ad32a3163c83b2
4
+ data.tar.gz: 4dfa3659ed1715b06d6e71e2dd12354aad1951a3
5
5
  SHA512:
6
- metadata.gz: ed02d1e28b70c8d1ea20b6aedba0688975c2d0dd1aedbe09c674e559d241f2411599d56e4c9b59e3b82d90e4a2e25c229791aa4d6f75875193ded0494a6a0277
7
- data.tar.gz: edeb0c86f39c90b94338e382a41a47ff71395be83ff0d7a615bd5982f5eef976162abbaac1b31ebefc1a6982f7213b14e7205910fc927ddd98b848cc28783e45
6
+ metadata.gz: 7b43b05258e4d44f46360b1aba60c01bc36b4509b333918f232ccbf40b36b84acf5c62feb7d6c2bcf03bf7e23966d430148a826f5584554c35f4d4fc67ed1130
7
+ data.tar.gz: 89a329fa3c63b9a6e6e1ace78f92f0d04391c029425889d03c9cc56ce80949b5b30b7299352d8327189abd63058ac1cb8759d9f2b75b4e44b81a2e997570050b
@@ -1,3 +1,3 @@
1
1
  module TbxImporter
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
data/lib/tbx_importer.rb CHANGED
@@ -121,11 +121,11 @@ module TbxImporter
121
121
  when [116, 101, 114, 109] #term
122
122
  write_term(reader)
123
123
  when [116, 101, 114, 109, 78, 111, 116, 101] #termNote
124
- @doc[:term][:part_of_speech] = PrettyStrings::Cleaner.new(reader.read_string.downcase).pretty.gsub("/", '').gsub("\\","\").gsub("'",%q(\\\')) if reader.get_attribute("type").eql?("partOfSpeech")
124
+ @doc[:term][:part_of_speech] = PrettyStrings::Cleaner.new(reader.read_string.downcase).pretty.gsub("\\","\").gsub("'",%q(\\\')) if reader.get_attribute("type").eql?("partOfSpeech")
125
125
  @doc[:term][:vals].pop
126
126
  write_term(reader)
127
127
  when [100, 101, 115, 99, 114, 105, 112] #descrip
128
- @doc[:tc][:definition] = PrettyStrings::Cleaner.new(reader.read_string).pretty.gsub("/", '').gsub("\\","\").gsub("'",%q(\\\\')) if reader.get_attribute("type").eql?("definition")
128
+ @doc[:tc][:definition] = PrettyStrings::Cleaner.new(reader.read_string).pretty.gsub("\\","\").gsub("'",%q(\\\')) if reader.get_attribute("type").eql?("definition")
129
129
  @doc[:tc][:vals].pop
130
130
  write_tc
131
131
  end
@@ -138,7 +138,7 @@ module TbxImporter
138
138
 
139
139
  def write_term(reader)
140
140
  return if reader.read_string.nil?
141
- text = PrettyStrings::Cleaner.new(reader.read_string).pretty.gsub("/", '').gsub("\\","\").gsub("'",%q(\\\'))
141
+ text = PrettyStrings::Cleaner.new(reader.read_string).pretty.gsub("\\","\").gsub("'",%q(\\\'))
142
142
  word_count = text.gsub("\s+", ' ').split(' ').length
143
143
  @doc[:term][:vals] << [@doc[:tc][:id], @doc[:term][:lang], @doc[:term][:part_of_speech], text]
144
144
  end
@@ -30,7 +30,7 @@
30
30
  </ntig>
31
31
  </langSet>
32
32
  </termEntry>
33
- <termEntry id="3_106184"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">To shorten the fractional part of a number, increasing the last remaining (rightmost) digit or not, according to whether the deleted portion was over or under five.</descrip></descripGrp><ntig><termGrp><term id="106184">round</term><termNote type="partOfSpeech">Verb</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="106187">arrondir</term><termNote type="partOfSpeech">Verb</termNote></termGrp></ntig></langSet></termEntry><termEntry id="4_156085"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">Personally identifiable information (PII) that is protected in special ways by law or policy.</descrip></descripGrp><ntig><termGrp><term id="156085">sensitive data</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="156096">données sensibles</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet></termEntry><termEntry id="5_182425"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">A business unit that is immediately under another business unit in the business hierarchy of an organization.</descrip></descripGrp><ntig><termGrp><term id="182425">child business unit</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="182429">sous-division</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet></termEntry><termEntry id="7_96886"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">The mode of a command-line application where it does not display confirmation messages or any other user interface items that normally appear on screen. The switch for quiet mode is typically '/q'.</descrip></descripGrp><ntig><termGrp><term id="96886">quiet mode</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="212192">mode silencieux</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet></termEntry><termEntry id="9_179350"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">A virtual hard disk that points to and uses an entire physical disk for the purpose of converting a data disk to a virtual hard disk. You cannot turn on a virtual machine if a linked disk is attached to the virtual machine.</descrip></descripGrp><ntig><termGrp><term id="179350">linked virtual hard disk</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="179352">disque dur virtuel lié</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet></termEntry><termEntry id="10_307453"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">An interface that is used to navigate the menus of a Unified Messaging (UM) system using DTMF or touchtone inputs.</descrip></descripGrp><ntig><termGrp><term id="307453">Telephone User Interface</term><termNote type="partOfSpeech">Proper Noun</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="318298">interface utilisateur de téléphonie</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet></termEntry><termEntry id="10_307467"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">An interface that is used to navigate the menus of a Unified Messaging (UM) system using DTMF or touchtone inputs.</descrip></descripGrp><ntig><termGrp><term id="307467">TUI</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="318299">TUI</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet></termEntry><termEntry id="10_1218391"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">An interface that is used to navigate the menus of a Unified Messaging (UM) system using DTMF or touchtone inputs.</descrip></descripGrp><ntig><termGrp><term id="1218391">touchtone interface</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="1783210">interface à tonalité</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet></termEntry>
33
+ <termEntry id="3_106184"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">To shorten the fractional part of a number, increasing the last remaining (rightmost) digit or not, according to whether the deleted portion was over or under five.</descrip></descripGrp><ntig><termGrp><term id="106184">round</term><termNote type="partOfSpeech">Verb</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="106187">arrondir</term><termNote type="partOfSpeech">Verb</termNote></termGrp></ntig></langSet></termEntry><termEntry id="4_156085"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">Personally identifiable information (PII) that is protected in special ways by law or policy.</descrip></descripGrp><ntig><termGrp><term id="156085">sensitive data</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="156096">données sensibles</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet></termEntry><termEntry id="5_182425"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">A business unit that is immediately under another business unit in the business hierarchy of an organization.</descrip></descripGrp><ntig><termGrp><term id="182425">child business unit</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="182429">sous-division</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet></termEntry><termEntry id="7_96886"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">The mode of a command-line application where it does not display confirmation messages or any other user interface items that normally appear on screen. The switch for quiet mode is typically q.</descrip></descripGrp><ntig><termGrp><term id="96886">quiet mode</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="212192">mode silencieux</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet></termEntry><termEntry id="9_179350"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">A virtual hard disk that points to and uses an entire physical disk for the purpose of converting a data disk to a virtual hard disk. You cannot turn on a virtual machine if a linked disk is attached to the virtual machine.</descrip></descripGrp><ntig><termGrp><term id="179350">linked virtual hard disk</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="179352">disque dur virtuel lié</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet></termEntry><termEntry id="10_307453"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">An interface that is used to navigate the menus of a Unified Messaging (UM) system using DTMF or touchtone inputs.</descrip></descripGrp><ntig><termGrp><term id="307453">Telephone User Interface</term><termNote type="partOfSpeech">Proper Noun</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="318298">interface utilisateur de téléphonie</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet></termEntry><termEntry id="10_307467"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">An interface that is used to navigate the menus of a Unified Messaging (UM) system using DTMF or touchtone inputs.</descrip></descripGrp><ntig><termGrp><term id="307467">TUI</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="318299">TUI</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet></termEntry><termEntry id="10_1218391"><langSet xml:lang="en-US"><descripGrp><descrip type="definition">An interface that is used to navigate the menus of a Unified Messaging (UM) system using DTMF or touchtone inputs.</descrip></descripGrp><ntig><termGrp><term id="1218391">touchtone interface</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet><langSet xml:lang="fr-fr"><ntig><termGrp><term id="1783210">interface à tonalité</term><termNote type="partOfSpeech">Noun</termNote></termGrp></ntig></langSet></termEntry>
34
34
  <termEntry id="12_233129">
35
35
  <langSet xml:lang="en-US">
36
36
  <descripGrp>
@@ -53,7 +53,7 @@ describe TbxImporter do
53
53
  it 'imports a UTF-8 TBX file 6' do
54
54
  file_path = File.expand_path('../tbx_importer/spec/sample_files/sample_1(utf-8).tbx')
55
55
  tbx = TbxImporter::Tbx.new(file_path: file_path).import
56
- expect(tbx[0][4][1]).to eq("The mode of a command-line application where it does not display confirmation messages or any other user interface items that normally appear on screen. The switch for quiet mode is typically \\'q\\'.")
56
+ expect(tbx[0][4][1]).to eq("The mode of a command-line application where it does not display confirmation messages or any other user interface items that normally appear on screen. The switch for quiet mode is typically q.")
57
57
  end
58
58
 
59
59
  it 'imports a UTF-16 TBX file' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tbx_importer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias