rowx 0.6.0 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rowx.rb +13 -7
- metadata +32 -29
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1105fda5cd1829ebba2275b56a3b04937d5e4c0db109f113a40c2162e106a1e1
|
4
|
+
data.tar.gz: 72874acc3709cd44d95a43078fbc93db94934ba876fd9376aced5b3124fa7e55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bedd7f84e21df706e34a2da9c14bdc8f098930d9f00fa8355390111b76d7a26ea232bfdb036646e6e049ce05c6e972ea97a821be05e60b881b56230e2b7b456
|
7
|
+
data.tar.gz: 1e64d2a2d93cfb5976abdacbea272cb3cc7c52110d2a56a7fcad488a7ad818a8120fba021cae272d06185722d68202f928e5dafa7338fd089941d97046b14121
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rowx.rb
CHANGED
@@ -31,11 +31,14 @@ end
|
|
31
31
|
class RowX
|
32
32
|
|
33
33
|
using ArrayCollate
|
34
|
+
using ColouredText
|
34
35
|
|
35
36
|
attr_reader :to_a, :to_xml, :to_lines
|
36
37
|
|
37
38
|
def initialize(txt, level: nil, ignore_blank_lines: false,
|
38
|
-
abort_1_row: false)
|
39
|
+
abort_1_row: false, debug: false, name: 'item')
|
40
|
+
|
41
|
+
@name, @debug = name, debug
|
39
42
|
|
40
43
|
# auto indent any multiline values
|
41
44
|
|
@@ -51,10 +54,12 @@ class RowX
|
|
51
54
|
end
|
52
55
|
|
53
56
|
end
|
57
|
+
|
58
|
+
puts 'lines: ' + lines.inspect if @debug
|
54
59
|
|
55
60
|
a = LineTree.new(lines.join, level: level,
|
56
|
-
ignore_blank_lines: ignore_blank_lines).to_a
|
57
|
-
|
61
|
+
ignore_blank_lines: ignore_blank_lines, debug: debug).to_a
|
62
|
+
puts ('a: ' + a.inspect).debug if @debug
|
58
63
|
|
59
64
|
keyfield = a[0][0][/\w+:/]; i = 0
|
60
65
|
|
@@ -96,12 +101,13 @@ class RowX
|
|
96
101
|
def scan_a(row)
|
97
102
|
|
98
103
|
a = row.map do |field|
|
99
|
-
|
104
|
+
|
105
|
+
puts 'field: ' + field.inspect if @debug
|
100
106
|
s = field.is_a?(Array) ? field[0] : field
|
101
107
|
|
102
108
|
return if s.empty?
|
103
|
-
|
104
|
-
found = s.match(/^(\w+)
|
109
|
+
puts 's: ' + s.inspect if @debug
|
110
|
+
found = s.match(/^(\w+)(?:\:$|\:\s+)(.*)/m)
|
105
111
|
|
106
112
|
value, name = found ? found.captures.reverse : s
|
107
113
|
name ||= 'description'
|
@@ -120,7 +126,7 @@ class RowX
|
|
120
126
|
result
|
121
127
|
end
|
122
128
|
|
123
|
-
[
|
129
|
+
[@name, {}, '' ] + a
|
124
130
|
end
|
125
131
|
|
126
132
|
def scan_records(rows, level)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rowx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,28 +10,32 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
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3RlckBqYW1lc3JvYmVydHNvbi5ldTAN
|
28
|
+
BgkqhkiG9w0BAQsFAAOCAYEAamu6TUzgQljUfB2b/5AQ4uSX9hLSuABIaaOCp7dC
|
29
|
+
6+50s7KPGO8OnFMg4dNh9owERjwy05ad5UditqQssYn4v3i7rAgGFMpajgV85fIu
|
30
|
+
Yk4HeZpwGT0Rh0puJX+lVcY4H+/0v/ilv6PQN1mnB+wdHp/wh4DcAbKoVntrVMKY
|
31
|
+
uSD00z/OGvu8Wt8cDoKKsvRx/M8+BA8Jh0d9rAbbD1wJxdO3dhr+xPe69rpzVQ0k
|
32
|
+
hHrQ2eQ6j5QceP2EbQAME42Sd+CIP8xT4HeAsUJWTqHGs0kiJvomHUTGe+JzBfke
|
33
|
+
CiKEYV1eq9T4rPX7hh9g+fvj66W5e/gJ6O+3fskNhzvP/lrnXPVs8ourOYI7Uoml
|
34
|
+
rP6fc4AahiTW5g9Yd93IIwivGQ1oRMfU15qn8AbxqV8hfbg8l8TqvJlh2vzyXZNb
|
35
|
+
800/1OqpheFJ2kxsgvkGfxh/3RV+ObACeZ/HSFCxStB23EvqS8umVWDkXA3qr3RB
|
36
|
+
yuZ4lODk6vzJbiDVh0MAHLnZ
|
33
37
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
38
|
+
date: 2020-10-02 00:00:00.000000000 Z
|
35
39
|
dependencies:
|
36
40
|
- !ruby/object:Gem::Dependency
|
37
41
|
name: line-tree
|
@@ -39,21 +43,21 @@ dependencies:
|
|
39
43
|
requirements:
|
40
44
|
- - "~>"
|
41
45
|
- !ruby/object:Gem::Version
|
42
|
-
version: '0.
|
46
|
+
version: '0.9'
|
43
47
|
- - ">="
|
44
48
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
49
|
+
version: 0.9.1
|
46
50
|
type: :runtime
|
47
51
|
prerelease: false
|
48
52
|
version_requirements: !ruby/object:Gem::Requirement
|
49
53
|
requirements:
|
50
54
|
- - "~>"
|
51
55
|
- !ruby/object:Gem::Version
|
52
|
-
version: '0.
|
56
|
+
version: '0.9'
|
53
57
|
- - ">="
|
54
58
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
56
|
-
description: Generates XML from rows of labelled text, nested text,
|
59
|
+
version: 0.9.1
|
60
|
+
description: Generates XML from rows of labelled text, nested text, and plain text
|
57
61
|
email: james@jamesrobertson.eu
|
58
62
|
executables: []
|
59
63
|
extensions: []
|
@@ -79,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
83
|
- !ruby/object:Gem::Version
|
80
84
|
version: '0'
|
81
85
|
requirements: []
|
82
|
-
|
83
|
-
rubygems_version: 2.6.8
|
86
|
+
rubygems_version: 3.0.3
|
84
87
|
signing_key:
|
85
88
|
specification_version: 4
|
86
89
|
summary: rowx
|
metadata.gz.sig
CHANGED
Binary file
|