README.md (view raw)
1
2
3
4
5
6
7
8---
9
10## What is bibel?
11
12`bibel` (bee•bell) isn’t another all‑purpose Bible app. It’s a small CLI/TUI
13utility with one main job: showing today’s reading from the Gospels when you
14open your terminal. Think of it as a MOTD for Scripture: just 12 verses a day,
15based on the calendar, without menus, search, or bloat.
16
17That is just the default configuration, most of which can be changed to suit
18one's preferences.
19
20## How do I use bibel?
21
22 bibel [OPTIONS]...
23
24By default, `bibel` shows an interactive TUI with today's reading. The verses
25are selected by date: day of year * 12 verses, progressing through all four
26Gospels each day.
27
28### Options
29
30 -r, --reading Reading mode: "evangelion" (four Gospels), "new_testament",
31 "old_testament", "bible" (default: evangelion)
32 -p, --plain Output plain text without formatting or TUI
33 -f, --formatted Output formatted text with ANSI colours (no TUI)
34 -n, --numbered Print each verse on a numbered line with verse number
35 -g, --paragraphs Render pilcrows (¶) as blank lines instead of ignoring them
36 -l, --latin Show time until Roman Catholic Easter instead of Orthodox
37 --generate-config Generate a default configuration file and exit
38 -v, --verbose Print additional runtime information to STDOUT
39
40### Examples
41
42 # Default TUI mode with interactive display (shows Orthodox Easter progress)
43 bibel
44
45 # Roman Catholic Easter progress bar instead of Orthodox
46 bibel --latin
47
48 # Plain text output
49 bibel --plain
50
51 # Formatted output with ANSI colours
52 bibel --formatted
53
54 # Numbered verses (each verse on its own line with verse number)
55 bibel --numbered
56
57 # Paragraph mode (pilcrows render as blank lines)
58 bibel --paragraphs
59
60 # Generate configuration file
61 bibel --generate-config
62
63## How does `bibel` work?
64
65`bibel` reads Bible data from a JSON file (provided example:
66`books/pol_nbg.json`). It calculates today's reading position by:
67
681. Getting the current day of year (1-366)
692. Multiplying by 12 verses per day: `offset = (day_of_year - 1) * 12`
703. Applying modulo with total Gospel verses (3779) to cycle yearly
714. Finding the corresponding verses in the Gospels
72
73The program extends to the end of a chapter if less than 12 verses remain for
74the next day. Books 40-43 correspond to the four Gospels: Matthew, Mark, Luke,
75and John.
76
77The TUI shows a progress bar counting down to the next Easter, with Orthodox
78Easter as default (calculated via Meeus Julian algorithm). Use `-l/--latin` for
79Roman Catholic Easter (Delambre and Butcher's algorithm).
80
81## Configuration
82
83`bibel` supports configuration via a TOML file at
84`$XDG_CONFIG_HOME/bibel/config.toml` (default: `~/.config/bibel/config.toml`).
85macOS and Windows are also supported automatically (see
86[here](https://github.com/adrg/xdg) for more details). Settings include output
87mode, reading mode, border style, colours, and Easter type.
88
89Generate a default configuration:
90
91 bibel --generate-config
92
93## How do I build bibel?
94
95`bibel` is written in Go. External dependencies are `bubbletea` (TUI),
96`lipgloss` (styling), `go-arg` (argument parsing), `viper` (configuration), and
97`xdg` (XDG Base Directory support).
98
99Build with:
100
101 go build ./cmd/bibel.go
102
103### And the Bible?
104
105Though Bibles in the exact JSON format that `bibel` expects are not found lying
106around the web everywhere, I have compiled a collection of (mainly Protestant)
107Bibles in this exact JSON format over at the
108[`json_bibles`](https://codeberg.org/maxwelljensen/json_bibles) repository.
109This has been helpfully provided by [Bible
110SuperSearch](https://www.biblesupersearch.com/bible-downloads/).
111
112## Documentation
113
114For more specific information, refer to the `man` page located at
115`docs/bibel.1`. It is recommended to put it in `$MANPATH` for easy access via
116`man bibel` on your Linux system.
117
118## Licence
119
120This project is licensed under [European Union Public Licence
1211.2](https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12).