sportdb-parser 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/bin/fbtok +2 -2
- data/lib/sportdb/parser/lang.rb +3 -0
- data/lib/sportdb/parser/linter.rb +8 -1
- data/lib/sportdb/parser/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3721d30a9ec1145f59d6bc84bb9a6cf81330fdafa00314decc2c165f2c6b92c1
|
4
|
+
data.tar.gz: a50b917e0bc5db3ac21cb4ead5507233cbd91f4b6f3b52668ef74ba8c6db6140
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e286842bcb5c163d841d414a15d4cbd91359324b88106603e22ebbec19b4cb8ffff3119d92a5c9e302e6aeabbc8a7ba74975efebee11ba275ce1d49f0286c1f
|
7
|
+
data.tar.gz: f237aedda025eb35bb08b31345941a3f1f073cbf8c3495c1afcf6e45de73f067e47a8a4c55981d5881079a5ca45a04af427908f379555208c98851c5d4751aa1
|
data/CHANGELOG.md
CHANGED
data/bin/fbtok
CHANGED
@@ -22,13 +22,13 @@ parser = OptionParser.new do |parser|
|
|
22
22
|
|
23
23
|
parser.on( "--verbose", "--debug",
|
24
24
|
"turn on verbose / debug output (default: #{opts[:debug]})" ) do |debug|
|
25
|
-
opts[:debug] =
|
25
|
+
opts[:debug] = true
|
26
26
|
end
|
27
27
|
|
28
28
|
parser.on( "--metal",
|
29
29
|
"turn off typed parse tree; show to the metal tokens"+
|
30
30
|
" (default: #{opts[:metal]})" ) do |metal|
|
31
|
-
opts[:metal] =
|
31
|
+
opts[:metal] = true
|
32
32
|
end
|
33
33
|
end
|
34
34
|
parser.parse!( args )
|
data/lib/sportdb/parser/lang.rb
CHANGED
@@ -59,6 +59,7 @@ def read( path, parse: false )
|
|
59
59
|
|
60
60
|
## process nodes
|
61
61
|
h1 = nil
|
62
|
+
h2 = nil
|
62
63
|
orphans = 0 ## track paragraphs's with no heading
|
63
64
|
|
64
65
|
attrib_found = false
|
@@ -69,8 +70,14 @@ def read( path, parse: false )
|
|
69
70
|
|
70
71
|
if type == :h1
|
71
72
|
h1 = node[1] ## get heading text
|
72
|
-
puts
|
73
73
|
puts " = Heading 1 >#{node[1]}<"
|
74
|
+
elsif type == :h2
|
75
|
+
if h1.nil?
|
76
|
+
puts "!! WARN - no heading for subheading; skipping parse"
|
77
|
+
next
|
78
|
+
end
|
79
|
+
h2 = node[1] ## get heading text
|
80
|
+
puts " == Heading 2 >#{node[1]}<"
|
74
81
|
elsif type == :p
|
75
82
|
|
76
83
|
if h1.nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sportdb-parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocos
|