|
2 vuotta sitten | |
---|---|---|
download | 2 vuotta sitten | |
text | 2 vuotta sitten | |
.gitignore | 2 vuotta sitten | |
COPYING | 2 vuotta sitten | |
COPYING.LESSER | 2 vuotta sitten | |
README.md | 2 vuotta sitten | |
example.config.toml | 2 vuotta sitten | |
go.mod | 2 vuotta sitten | |
go.sum | 2 vuotta sitten | |
main.go | 2 vuotta sitten |
A Go API for Heb12 that makes reading the Bible over the Web simple.
It is basically a web overlay for heb12/heb12.
/get
/get
returns Bible text from references/download
returns a URL for a whole OSIS workNote: The endpoints are subject to change at any time, and are not yet stable.
/get
returns Bible text when given a reference and a version.
Example:
https://api.heb12.com/get?reference=Hebrews 4.12-13&version=web
Return example:
{
"errors": [],
"data": {
"text": [
{
"version": "web",
"language": "en",
"reference": "Heb 4.12-13",
"book": "Heb",
"chapter": 4,
"from": 12,
"to": 13,
"wholeChapter": false,
"verses": [
"For the word of God is living, and active, and sharper than any two-edged sword, and piercing even to the dividing of soul and spirit, of both joints and marrow, and quick to discern the thoughts and intents of the heart.",
"There is no creature that is hidden from his sight, but all things are naked and laid open before the eyes of him with whom we have to do."
]
}
]
}
}
This is a basic installation guide (for a server).
Prerequisites:
Download the Gratis Bibles to a directory and choose the split Bible branch.
$ git clone https://github.com/gratis-bible/bible gratisbibles
$ cd gratisbibles
$ git checkout split
Next, download and build bibleget.
$ cd ~
$ git clone https://code.heb12.com/heb12/bibleget
$ cd bibleget
$ go build
Copy the example configuration to config.toml
and edit Dir
to the appropriate directory (see “Configuration” below)
$ cp example.config.toml config.toml
$ nano config.toml
Finally, run it.
$ screen # so you can detatch without killing it
(screen) $ ./api
Now bibleget will be running on port 5500 (or any other port you set in config.toml
).
The default config file is config.toml
, but you can move it wherever if you change the configFile
variable in main.go
.
To change the port that bibleget uses, change 5500
in Port: 5500
to whatever port you want it to run on.
To change the Bible translation returned when the user doesn’t specify one, change Version: "web"
to the translation you would prefer.
Make sure to change the value of Dir
under Bible
to where you downloaded the Gratis Bibles (without the trailing slash). If you followed the above installation instructions exactly, it should be ../gratisbibles
.
Blank quotes (""
) means it uses the default Heb12 Gratis Bible directory (~/.local/share/heb12/gratis
).
Copyright (C) 2020 Josias Allestad justjosias@tutanota.com and other Heb12 contributors
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.