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' 1 year ago
COPYING Add program 1 year ago
COPYING.LESSER Add program 1 year ago
README.md Rename Heb12/bref to heb12/bref 1 year ago
books.go Update 'books.go' 1 year ago
bref.go Support more separators and duplicates 1 year ago
bref_test.go Support more separators and duplicates 1 year ago
go.mod Rename Heb12/bref to heb12/bref 1 year ago
info.go Fix problems caused by dependence on JSON 1 year ago



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

Inspired by chapter-and-verse.


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


package main

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

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


  • 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)


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{}


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.