bible_parser 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32bd13b35cbb3041347d60987896ac2f2686c6793f850e675edff1cd08f76b73
4
- data.tar.gz: b67396dff174fe8a0a0c8e1f6cb4f1caf46094ab1fa2b51e8167cafdf1b5b7f1
3
+ metadata.gz: b93f1478453d5f5ab023e5baa1e3b8cec47c84f573565cb54d56720a1eb9a68e
4
+ data.tar.gz: b8cf28305651e81ffde67eb66fe8bdb0ca5323c152ca13654cdf5b565a6da757
5
5
  SHA512:
6
- metadata.gz: 025d34cb5576169c0a5e86f43db0feb7db276597e895a923af709265c1cba66a4c52ff71a0875abf891375ffb8eb888aa0a75ab12a9fbf519877f32237eaf19d
7
- data.tar.gz: 3ae8a2a336fe5652eb98000da8d3d3b55d9cf782393934565011ff4283764c7ad549a34dca76321403e401ef47321b792191bf3af101b3038378d5ebb1c89590
6
+ metadata.gz: d77b81710e51ebf2ccfc458dfe3e83a8d638fb7aab482c0c0fc98d86805f8d8ed307733f3b0c48398df88a76c289b158d3bc35b32ba93be4efff569038daa299
7
+ data.tar.gz: 1cecf61c6d06201abe67c0471bd1943900b7fb6705c6747b0e4a82596cb2f29f5ae2261a656a255cd56a8d4c09b6c2d7534c2124348a6c22ce73eec2f1b803b4
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # BibleParser
2
2
 
3
- [![Build Status](https://travis-ci.org/seven1m/bible_parser.svg?branch=master)](https://travis-ci.org/seven1m/bible_parser)
3
+ [![Build](https://github.com/seven1m/bible_parser/actions/workflows/specs.yml/badge.svg)](https://github.com/seven1m/bible_parser/actions/workflows/specs.yml)
4
4
 
5
5
  This is a Ruby library for parsing different bible XML formats.
6
6
 
@@ -21,6 +21,8 @@ class BibleParser
21
21
  when 'verse'
22
22
  end_verse if @mode == 'verse'
23
23
  start_verse(attributes)
24
+ when 'note'
25
+ start_footnote(attributes)
24
26
  end
25
27
  end
26
28
 
@@ -31,6 +33,8 @@ class BibleParser
31
33
  end_book
32
34
  @book_id = nil
33
35
  end
36
+ when 'note'
37
+ @mode = 'verse'
34
38
  end
35
39
  end
36
40
 
@@ -77,6 +81,15 @@ class BibleParser
77
81
  @mode = 'verse'
78
82
  end
79
83
 
84
+ # Properly parse footnotes out of the text that shows up within a verse
85
+ def start_footnote(attributes)
86
+ @mode = 'note'
87
+ end
88
+
89
+ def end_footnote(attributes)
90
+ @mode = 'verse'
91
+ end
92
+
80
93
  def characters(string)
81
94
  case @mode
82
95
  when 'verse'
@@ -10,10 +10,12 @@ class BibleParser
10
10
  def start_element(name, attributes)
11
11
  case name
12
12
  when 'book'
13
+ end_verse if @mode == 'verse'
13
14
  start_book(attributes)
14
15
  when 'h'
15
16
  start_book_title(attributes)
16
17
  when 'c'
18
+ end_verse if @mode == 'verse'
17
19
  start_chapter(attributes)
18
20
  when 'v'
19
21
  end_verse if @mode == 'verse'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bible_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Morgan
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-11 00:00:00.000000000 Z
11
+ date: 2024-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description:
55
+ description:
56
56
  email: tim@timmorgan.org
57
57
  executables: []
58
58
  extensions: []
@@ -82,7 +82,7 @@ files:
82
82
  homepage: https://github.com/seven1m/bible_parser
83
83
  licenses: []
84
84
  metadata: {}
85
- post_install_message:
85
+ post_install_message:
86
86
  rdoc_options: []
87
87
  require_paths:
88
88
  - lib
@@ -97,8 +97,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  requirements: []
100
- rubygems_version: 3.0.3
101
- signing_key:
100
+ rubygems_version: 3.5.3
101
+ signing_key:
102
102
  specification_version: 4
103
103
  summary: Library for parsing the bible in various formats
104
104
  test_files: []