The combination of essential Heb12 libraries
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.
 
 
 
 
Josias 0dfdd255a5 bref: remove obsolete test 5 months ago
data/bref Add bref 5 months ago
include/heb12 Add bref 5 months ago
src bref: fix stack error 5 months ago
tests bref: remove obsolete test 5 months ago
.clang-format format: includes should be sorted 5 months ago
.gitignore Add build system 5 months ago
LICENSE Add build system 5 months ago
Makefile Makefile: add stack protector flags 5 months ago
README.md Add bref 5 months ago
TODO.md Add TODO.md 5 months ago
run_test.sh tests: fix printing current test 5 months ago

README.md

libheb12

The combination of the Heb12 backend written in C.

Installation

To build, simply run make. It builds a static library to dist/libheb12.a.

A shared library can also be built by running make shared. make install installs it to prefix, which is /usr/local by default.

These options can be changed in the Makefile.

Libraries

bref

bref is a simple Bible reference parser. It splits apart references like John 3:16-17, but not more complex (see fbrp). It reads the data directory provided by heb12_data_dir and reads a file with a list of ways to shorten Bible books (usually /usr/local/share/heb12/bref/books_all.csv).

config

The configuration library providing functions for finding and loading configuration for Heb12.

Configuration files are normally saved to ~/.config/heb12 and shared data (such as book names and Bibles) are normally saved to /usr/local/share/heb12. This can be configured during the build by defining (or undefining, to use ~/.local/share/heb12) HEB12_DATA_DIR.

Shared data is stored in /usr/local/share/heb12 because certain files need to be installed to it and are not generated by the program itself (except for the Bibles, which are downloaded by the program).

haplous

A parser for the haplous Bible format.

#include <stdio.h>
#include <heb12/haplous.h>

int main()
{
        int err = 0;
        struct haplous_work work = haplous_work_init("web.txt", &err);
        if (err != HAPLOUS_OK) {
                fprintf(stderr, "Failed to open web.txt\n");
                return 1;
        }
}

See more examples in the tests.

License

Copyright (C) 2020, Josias Allestad and other Heb12 contributors. Licensed under the BSD-3-Clause license. See the license file for more information.