Browse Source

Add 'formats.md'

Some basic information
master
Josias 2 years ago
parent
commit
3e970dac9b
1 changed files with 89 additions and 0 deletions
  1. +89
    -0
      formats.md

+ 89
- 0
formats.md View File

@@ -0,0 +1,89 @@
# Formats

Heb12 supplies some formats for storing the Bible.

**Note:** all of this is subject to change at any time. This is not even an alpha spec yet.

## haplous

haplous (ἁπλοῦς) - simple

A simple, fast, and extensible format for reading the Bible.

### Principles

These are the main principles of the format and their priority in comparison to each other.

1. Speed
2. Simplicity
3. Flexibility

#### Speed

The format should be optimized for quick parsing.

#### Simplicity

All configuration of the format should be obvious and minimal. It is also easily parsible because all the verses are context-free. You can pull any verse and it has the exact reference built in. This makes it extremely easy to parse.

#### Flexibility

Since the main format is just plain text, configuration can be added in many forms while still maintaining simplicity.

### Spec

There are two forms of the

#### Vocabulary

- "Work" is a Bible document
- "Metadata" refers to the information above the file or in the `work.toml` file.
- "Sections" are simply Bible books

#### Metadata

The metadata for a work should either be stored in a file called `work.toml` or in a section called `[metadata]` at the beginning of the document.

A `work.toml` example:

```
[metadata]
lang = "en"
title = "World English Bible"
id = "WEB"
public_domain = true
type = "bible"

[order]
sections = [
"Gen",
"Exod",
...
]

[files]
location = "{section}/{chapter}.txt" # gen/1.txt

```

### Examples

```
[metadata]
lang = "en"
title = "World English Bible"
id = "WEB"
public_domain = true
type = "bible"

[order]
sections = [
"Gen",
"Exod",
...
]

[text]
Gen.1.1 In the beginning God created the heavens and the earth.
Gen.1.2 Now the earth was formless and empty. Darkness was on the surface of the deep. God`s Spirit was hovering over the surface of the waters.
```

Loading…
Cancel
Save