GithubHelp home page GithubHelp logo

pericope's People

Contributors

boblail avatar canadaduane avatar kobsy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pericope's Issues

second book of two not recognized if it begins with a digit

When using Pericope::parse, if the second book in a pair begins with a digit, then that digit will be included in the 1st pericope, and the second book won't be recognized. An example will clarify:
blah Acts 20:21; Exodus 5:1-14 blah
is parsed correctly, but
blah Acts 20:21; 2 Kings 5:1-14 blah
is parsed as "Acts 20:21, 2". This one is recognizably an error because the verses shouldn't decrease, but something like "Exodus 1:10-2:1; 2 Kings 5:1-14" would be trickier.
I've never seen a BNF for Bible verses, I would think that ';' can be used to separate blocks of verses, but only if it's not being used to separate whole pericopes.

Not able to parse passage without space

Hi @boblail, I'm using your code successfully with a Twitter bot @opentxtbook. However, I have noted that Pericope cannot parse a passage written like Psalm1 or Ps1. It is requiring it be written Psalm 1 or Ps 1to parse successful.

This can be a problem since some people may not put a space between book and chapter.

Your code is greatly appreciated. Many thanks

Single Chapter Books - Allow book name without chapter / verse to resolve to whole book

I'd love for single chapter books to resolve just the same as a whole chapter reference. For example:

# nothing returned for this single chapter book
irb(main):020:0> Pericope.parse_one('Philemon')
=> nil
# full chapter verse range already handled for single chapter book WITHOUT chapter designation
irb(main):021:0> Pericope.parse_one('Philemon 1-25')
=> Pericope(Philemon 1–25)
irb(main):022:0> Pericope.parse_one('Ezekiel 1')
=> Pericope(Ezekiel 1)
# single chapter book could be similar to single chapter of multi chapter book
irb(main):023:0> Pericope.parse_one('Philemon 1-25').ranges
=> [57001001..57001025]
irb(main):024:0> Pericope.parse_one('Ezekiel 1').ranges
=> [26001001..26001028]

Right now we're handling this exception in a wrapper outside Pericope but would love if this was seen as a valid reference string. Thanks for the great library!

How can I tell which part I parse I the reference (chapter verse) versus the words themselves?

For example, I need to be able to parse the following string:

“A wise son makes a glad father, but a foolish man despises his mother.”
‭‭Proverbs‬ ‭15:20‬ ‭ESV‬‬
http://bible.com/59/pro.15.20.esv

I need to discard the link (I can do that with regex), but then know that sentence (which could be multiple sentences, or a partial sentence) are the words, and then Proverbs 15:20 has a book, chapter, verse, and then a translation.

It looks like the text parse makes these each elements in an array. Unless I am reading the docs wrong....but was hoping something could tell me the reference and then the actual text. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.