pxindex-builder 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/pxindex-builder.rb +6 -2
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 104ca6fc743176ff16ad3a8c04708b0e12cfbdb1
|
4
|
+
data.tar.gz: c726681463709bf8732cc192f7177c1500e89f8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 260251027050a9c28eb84f634b7412da6400220ffd4ba870e4d0b5c5e09d9619d0eb393908b4c040929634a0db1bb8e7a4515f7487a0954cac83086167c424ba
|
7
|
+
data.tar.gz: e35eb7185354cf457899a5e67fe790ed8fd63e4c2f3a6aa30a91747ff77858ca7b4e4cba8a2a46b24f2b56c3e48f282b3448278da3436ed9f48ce3e3c443935b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/pxindex-builder.rb
CHANGED
@@ -9,14 +9,16 @@ require 'polyrex-builder'
|
|
9
9
|
|
10
10
|
class PxIndexBuilder
|
11
11
|
|
12
|
-
attr_reader :to_xml
|
12
|
+
attr_reader :to_xml, :to_h
|
13
13
|
|
14
14
|
def initialize(raw_s, ignore=[])
|
15
15
|
|
16
16
|
s, _ = RXFHelper.read(raw_s)
|
17
17
|
|
18
18
|
h = YAML.load(s)
|
19
|
+
|
19
20
|
words = h.keys.join(' ').split(/ +/).map {|x| x[/\w+/]}.uniq\
|
21
|
+
#.tap {|x| puts 't: ' + x.inspect}
|
20
22
|
.reject {|x| x.length < 3}\
|
21
23
|
.reject {|x| ignore.include? x}\
|
22
24
|
.reject {|x| x.length < 4 and !WordsDotDat.list.include? x.downcase}\
|
@@ -35,7 +37,9 @@ class PxIndexBuilder
|
|
35
37
|
|
36
38
|
end
|
37
39
|
|
38
|
-
@
|
40
|
+
@to_h = h = scan(index)
|
41
|
+
@to_xml = PolyrexBuilder.new(h, parents: %i(entry)).to_xml
|
42
|
+
|
39
43
|
|
40
44
|
end
|
41
45
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pxindex-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
rpKyBm8O20gPepUR+u4B3OOMZL1vUMzoAppGGdK/fa9iZHfP9tccqmgXIQ8c4X1f
|
32
32
|
C74enOZQySX7LA==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2017-10-
|
34
|
+
date: 2017-10-22 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: wordsdotdat
|
metadata.gz.sig
CHANGED
Binary file
|