A Go module for parsing Bible references
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Daniel 29d90a1bc2 Update 'books.go' 6 months ago
COPYING Add program 8 months ago
COPYING.LESSER Add program 8 months ago
README.md Rename Heb12/bref to heb12/bref 7 months ago
books.go Update 'books.go' 6 months ago
bref.go Support more separators and duplicates 7 months ago
bref_test.go Support more separators and duplicates 7 months ago
go.mod Rename Heb12/bref to heb12/bref 7 months ago
info.go Fix problems caused by dependence on JSON 8 months ago

README.md

bref

An advanced Bible reference parser with first class multi-language support written in Go.

Inspired by chapter-and-verse.

Features

  • First class support for parsing references in other languages
  • Simplicity and division into different functions
  • Good information about each book

Example

package main

import "code.heb12.com/heb12/bref"

func main() {
	reference := "John 3:16"
	referenceData, _ := bref.Process(reference)
}

Todo

  • Search function (for searching different bookInfo fields and returning the matching books)
  • More language names (and find a better way to store them)
  • Possibly support non-linear Bible references. E.g. “John 3:16,18
  • Figure out a better way to process chapters without verses (possibly implement it into Process instead of Parse)

Contributing

The biggest way to contribute is to add more languages. Add the books of the Bible in a language to the books.go file. Here are some things to keep in mind:

  • Only alts different than the English alts should be added
  • If there are no alts for a particular book, leave it as []string{}

License

Copyright (C) 2020 Ted Jameson

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.

See COPYING.LESSER for more license information.

The JSON files are licensed under the ISC license, as found in chapter-and-verse.