HtmlCodeCleaner 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/HtmlCodeCleaner.rb +128 -7
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa1e6237d9a69a735ae0741013117ddec55435e5
4
- data.tar.gz: 1610dc07c4759e3016d4782948a97193eb48d38a
3
+ metadata.gz: 5e2544bc785c12b5510808fec95b9985a305483e
4
+ data.tar.gz: 159a96723599c92ffb67e3deb0cae1d252bbe03e
5
5
  SHA512:
6
- metadata.gz: 238965586873679aad3ca665fad9ddb397afa6d6e5cf61a963448847ef180e2adf6eedf268ca59fd3532c6c0d5a86d2732845baea32119b23eb8ca0bc2531906
7
- data.tar.gz: 2a4ad41549e35e17e61f6a5786f17077cbbf742c9ec7d3f1dcd405b2a2db255aca7609b21b72f71e81eff5fa41f70c0134f4d4842648a69bfad180e32c476759
6
+ metadata.gz: 588aca7599b752c70ebd9e8d0b79965bed037bab82de434f5bcf170de7e3b09aa826e95ea7062b65c7740e82936bef0475e54b00078dd38c4994323e8f832391
7
+ data.tar.gz: 4baefe30a6e89db87ee625e195318787d5d11f7e0b700ee61f1396e86ce69e4620d46eb692d35a044f80b4bb7f5310c8227c4b3782042a24f96c451b5eac3deb
@@ -11,8 +11,8 @@ class HtmlCodeCleaner
11
11
  if (string != nil)
12
12
  # This is the dictionary containing the html code and it's replacement symbol.
13
13
  dict = [
14
- [' '," "],
15
- ['!',"!"],
14
+ [' '," "],
15
+ ['!',"!"],
16
16
  ['"','"'], ['"','"'],
17
17
  ['#','#'],
18
18
  ['$',"$"],
@@ -213,7 +213,59 @@ class HtmlCodeCleaner
213
213
  ['Š',"Š"],
214
214
  ['š',"š"],
215
215
  ['Ÿ',"Ÿ"],
216
- ['ƒ',"ƒ"],
216
+ ['ƒ',"ƒ"],['ƒ',"ƒ"],
217
+ ['Α',"Α"],['Α',"Α"],
218
+ ['Β',"Β"],['Β',"Β"],
219
+ ['Γ',"Γ"],['Γ',"Γ"],
220
+ ['Δ',"Δ"],['Δ',"Δ"],
221
+ ['Ε',"Ε"],['Ε',"Ε"],
222
+ ['Ζ',"Ζ"],['Ζ',"Ζ"],
223
+ ['Η',"Η"],['Η',"Η"],
224
+ ['Θ',"Θ"],['Θ',"Θ"],
225
+ ['Ι',"Ι"],['Ι',"Ι"],
226
+ ['Κ',"Κ"],['Κ',"Κ"],
227
+ ['Λ',"Λ"],['Λ',"Λ"],
228
+ ['Μ',"Μ"],['Μ',"Μ"],
229
+ ['Ν',"Ν"],['Ν',"Ν"],
230
+ ['Ξ',"Ξ"],['Ξ',"Ξ"],
231
+ ['Ο',"Ο"],['Ο',"Ο"],
232
+ ['Π',"Π"],['Π',"Π"],
233
+ ['Ρ',"Ρ"],['Ρ',"Ρ"],
234
+ ['Σ',"Σ"],['Σ',"Σ"],
235
+ ['Τ',"Τ"],['Τ',"Τ"],
236
+ ['Υ',"Υ"],['Υ',"Υ"],
237
+ ['Φ',"Φ"],['Φ',"Φ"],
238
+ ['Χ',"Χ"],['Χ',"Χ"],
239
+ ['Ψ',"Ψ"],['Ψ',"Ψ"],
240
+ ['Ω',"Ω"],['Ω',"Ω"],
241
+ ['α',"α"],['α',"α"],
242
+ ['β',"β"],['β',"β"],
243
+ ['γ',"γ"],['γ',"γ"],
244
+ ['δ',"δ"],['δ',"δ"],
245
+ ['ε',"ε"],['ε',"ε"],
246
+ ['ζ',"ζ"],['ζ',"ζ"],
247
+ ['η',"η"],['η',"η"],
248
+ ['θ',"θ"],['θ',"θ"],
249
+ ['ι',"ι"],['ι',"ι"],
250
+ ['κ',"κ"],['κ',"κ"],
251
+ ['λ',"λ"],['λ',"λ"],
252
+ ['μ',"μ"],['μ',"μ"],
253
+ ['ν',"ν"],['ν',"ν"],
254
+ ['ξ',"ξ"],['ξ',"ξ"],
255
+ ['ο',"ο"],['ο',"ο"],
256
+ ['π',"π"],['π',"π"],
257
+ ['ρ',"ρ"],['ρ',"ρ"],
258
+ ['ς',"ς"],['ς',"ς"],
259
+ ['σ',"σ"],['σ',"σ"],
260
+ ['τ',"τ"],['τ',"τ"],
261
+ ['υ',"υ"],['υ',"υ"],
262
+ ['φ',"φ"],['φ',"φ"],
263
+ ['χ',"χ"],['χ',"χ"],
264
+ ['ψ',"ψ"],['ψ',"ψ"],
265
+ ['ω',"ω"],['ω',"ω"],
266
+ ['ϑ',"ϑ"],['ϑ',"ϑ"],
267
+ ['ϒ',"ϒ"],['ϒ',"ϒ"],
268
+ ['ϖ',"ϖ"],['ϖ',"ϖ"],
217
269
  ['–',"–"],
218
270
  ['—',"—"],
219
271
  ['‘',"‘"],
@@ -224,11 +276,80 @@ class HtmlCodeCleaner
224
276
  ['„',"„"],
225
277
  ['†',"†"],
226
278
  ['‡',"‡"],
227
- ['•',"•"],
228
- ['…',"…"],
279
+ ['•',"•"],['•',"•"],
280
+ ['…',"…"],['…',"…"],
229
281
  ['‰',"‰"],
230
- ['€',""], ['€',""],
231
- ['™',""] ]
282
+ ['′',""],['′',""],
283
+ ['″',""],['″',"″"],
284
+ ['‾',"‾"],['‾',"‾"],
285
+ ['⁄',"⁄"],['⁄',"⁄"],
286
+ ['€',"€"],['€',"€"],
287
+ ['ℑ',"ℑ"],['ℑ',"ℑ"],
288
+ ['℘',"℘"],['℘',"℘"],
289
+ ['ℜ',"ℜ"],['ℜ',"ℜ"],
290
+ ['™',"™"],['™',"™"],
291
+ ['ℵ',"ℵ"],['ℵ',"ℵ"],
292
+ ['←',"←"],['←',"←"],
293
+ ['↑',"↑"],['↑',"↑"],
294
+ ['→',"→"],['→',"→"],
295
+ ['↓',"↓"],['↓',"↓"],
296
+ ['↔',"↔"],['↔',"↔"],
297
+ ['↵',"↵"],['↵',"↵"],
298
+ ['⇐',"⇐"],['⇐',"⇐"],
299
+ ['⇑',"⇑"],['⇑',"⇑"],
300
+ ['⇒',"⇒"],['⇒',"⇒"],
301
+ ['⇓',"⇓"],['⇓',"⇓"],
302
+ ['⇔',"⇔"],['⇔',"⇔"],
303
+ ['∀',"∀"],['∀',"∀"],
304
+ ['∂',"∂"],['∂',"∂"],
305
+ ['∃',"∃"],['∃',"∃"],
306
+ ['∅',"∅"],['∅',"∅"],
307
+ ['∇',"∇"],['∇',"∇"],
308
+ ['∈',"∈"],['∈',"∈"],
309
+ ['∉',"∉"],['∉',"∉"],
310
+ ['∋',"∋"],['∋',"∋"],
311
+ ['∏',"∏"],['∏',"∏"],
312
+ ['∑',"∑"],['∑',"∑"],
313
+ ['−',"−"],['−',"−"],
314
+ ['∗',"∗"],['∗',"∗"],
315
+ ['√',"√"],['√',"√"],
316
+ ['∝',"∝"],['∝',"∝"],
317
+ ['∞',"∞"],['∞',"∞"],
318
+ ['∠',"∠"],['∠',"∠"],
319
+ ['∧',"∧"],['∧',"∧"],
320
+ ['∨',"∨"],['∨',"∨"],
321
+ ['∩',"∩"],['∩',"∩"],
322
+ ['∪',"∪"],['∪',"∪"],
323
+ ['∫',"∫"],['∫',"∫"],
324
+ ['∴',"∴"],['∴',"∴"],
325
+ ['∼',"∼"],['∼',"∼"],
326
+ ['≅',"≅"],['≅',"≅"],
327
+ ['≈',"≈"],['≈',"≈"],
328
+ ['≠',"≠"],['≠',"≠"],
329
+ ['≡',"≡"],['≡',"≡"],
330
+ ['≤',"≤"],['≤',"≤"],
331
+ ['≥',"≥"],['≥',"≥"],
332
+ ['⊂',"⊂"],['⊂',"⊂"],
333
+ ['⊃',"⊃"],['⊃',"⊃"],
334
+ ['⊄',"⊄"],['⊄',"⊄"],
335
+ ['⊆',"⊆"],['⊆',"⊆"],
336
+ ['⊇',"⊇"],['⊇',"⊇"],
337
+ ['⊕',"⊕"],['⊕',"⊕"],
338
+ ['⊗',"⊗"],['⊗',"⊗"],
339
+ ['⊥',"⊥"],['⊥',"⊥"],
340
+ ['⋅',"⋅"],['⋅',"⋅"],
341
+ ['⌈',"⌈"],['⌈',"⌈"],
342
+ ['⌉',"⌉"],['⌉',"⌉"],
343
+ ['⌊',"⌊"],['⌊',"⌊"],
344
+ ['⌋',"⌋"],['⌋',"⌋"],
345
+ ['〈',"⟨"],['⟨',"⟨"],
346
+ ['〉',"⟩"],['⟩',"⟩"],
347
+ ['◊',"◊"],['◊',"◊"],
348
+ ['♠',"♠"],['♠',"♠"],
349
+ ['♣',"♣"],['♣',"♣"],
350
+ ['♥',"♥"],['♥',"♥"],
351
+ ['♦',"♦"],['♦',"♦"]
352
+ ]
232
353
  # Parse the string of the html code and make the replacement
233
354
  dict.each { |x| string = string.gsub(x.first, x.last) }
234
355
  # return the string
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: HtmlCodeCleaner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hiland
@@ -10,7 +10,7 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2014-11-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: Parse a string of the html number, replace code with the corresponding
13
+ description: Parse a string of HTML Number and names, replace code with the corresponding
14
14
  symbol
15
15
  email: g2c9@ugrad.cs.ubc.ca
16
16
  executables: []
@@ -43,7 +43,7 @@ rubyforge_project:
43
43
  rubygems_version: 2.2.2
44
44
  signing_key:
45
45
  specification_version: 4
46
- summary: Replace Html code with symbol
46
+ summary: Replace over 400 Html code with symbols
47
47
  test_files:
48
48
  - test/test_hcc.rb
49
49
  has_rdoc: