CHANGELOG.md (view raw)
1# Changelog
2
3All notable changes to this project will be documented in this file.
4
5The format is based on [Keep a
6Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
7[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
9## [Unreleased]
10
11## [1.4.0] - 2026-04-17
12
13### Added
14
15- **Multiple reading modes** via new `-r/--reading` command line option:
16 - `evangelion` (default): Gospels only (Matthew, Mark, Luke, John)
17 - `new_testament`: Entire New Testament (books 40-66)
18 - `old_testament`: Old Testament only (books 1-39)
19 - `bible`: The entire Bible (books 1-66)
20- **Flexible Bible source support**: Can now work with any Bible translation
21 - Removed hardcoded Polish book names
22 - Reads `book_name` field directly from JSON data
23
24### Changed
25
26- **Date progression system enhanced**:
27 - `NewDateProgressionWithReadingMode()` accepts reading mode parameter
28 - Calculates verse positions based on selected reading scope
29 - Proper wrapping at boundaries of each reading mode
30- **Formatter now requires Bible reference**:
31 - `NewFormatterWithConfig()` now accepts `*Bible` parameter
32 - Formatter retrieves book names dynamically from loaded Bible data
33 - Updated all formatter initialization calls in codebase
34- **Book name handling refactored**:
35 - Removed `polishBookNames` map from `verse.go`
36 - `BookIndex.String()` returns numeric fallback representation
37 - Actual book names sourced from Bible JSON metadata
38- **Configuration system enhanced**:
39 - Added `reading_mode` configuration option with validation
40 - Command line `-r/--reading` overrides config setting
41 - Improved default value handling for empty configuration fields
42
43### Fixed
44
45- **Configuration validation**: Allow empty reading mode during initial load
46- **Build errors**: Fixed Go compilation issues in configuration unmarshalling
47- **Backward compatibility**: Maintains existing behavior for default mode
48
49## [1.3.0] - 2026-04-17
50
51### Added
52
53- **TOML configuration file** system with XDG Base Directory Specification
54compliance
55 - Configuration file location: `$XDG_CONFIG_HOME/bibel/config.toml` (default:
56 `~/.config/bibel/config.toml`). macOS and Windows also supported.
57 - Uses `xdg` for XDG compliance and `viper` for configuration management
58- **Configuration generation**: `--generate-config` flag creates default
59configuration file
60- **Comprehensive TUI aesthetic configuration**:
61 - `border_style`: "rounded", "double", "single", or "hidden"
62 - `border_colour`: Custom hex colour for box borders
63 - `header_colour`: Custom hex colour for header text
64 - `text_colour`: Custom hex colour for verse content
65 - `quit_colour`: Custom hex colour for quit message
66 - `show_quit_message`: Boolean to show/hide "Press q to quit..." message
67- **Formatter configuration**:
68 - `header_format`: Customisable header template with variables: `{book}`,
69 `{chapter}`, `{first_verse}`, `{second_verse}`
70 - `use_colours`: Enable/disable ANSI colour output in formatted mode
71- **Date progression configuration**:
72 - `verses_per_day`: Customisable number of verses per day (default: 12)
73- **Command-line override**: CLI flags (`--plain`, `--formatted`) override
74configuration settings
75- **Configuration validation**: Ensures valid output modes, border styles, and
76positive verse counts
77
78### Changed
79
80- **Formatter behaviour**: `FormatHeader()` now reads `header_format` from
81configuration instead of hardcoded format
82- **TUI styling**: All aesthetic properties (colours, border style) now
83configurable via TOML file
84- **Date progression**: `NewDateProgressionWithConfig()` accepts custom
85`verses_per_day` parameter
86- **Application flow**: Configuration loaded before processing, with
87command-line arguments taking precedence
88- **Package structure**: Added `internal/config.go` for configuration
89management
90
91## [1.2.0] - 2026-04-16
92
93### Added
94
95- **TUI framework** using `bubbletea` for interactive terminal user interface
96- **Styled output** with `lipgloss` for terminal-adaptive colours and borders
97- **Interactive mode**: Verse displayed in a rounded border box with "Press q
98to quit..." message
99- **Smart TTY detection**: Automatically falls back to formatted output in
100non-interactive environments
101- **Enhanced argument handling**: `-p/--plain` now outputs plain text without
102TUI or formatting
103- **New package structure**: `internal/tui/` containing TUI model and styling
104components
105
106### Changed
107
108- **Program flow**: Default mode now launches interactive TUI when run in a
109terminal
110- **Plain mode behaviour**: `--plain` flag now outputs only verse text (no
111header or TUI)
112- **Terminal detection**: Non-TTY environments show formatted output with ANSI
113colours
114- **Dependencies**: Added `bubbletea` and `lipgloss` for TUI functionality
115
116## [1.1.0] - 2026-04-16
117
118### Added
119
120- Argument parsing using `go-arg` library
121- `-p/--plain` flag to output plain text without chapter name or verse numbers
122- Program description and help text
123
124## [1.0.0] - 2026-04-16
125
126### Added
127
128- Complete Go migration from original OCaml implementation
129- Date-based Bible verse progression system
130 - Calculates position based on day of year (1st January = Matthew 1:1-12)
131 - Shows 12 verses per day, cycling through all four Gospels yearly
132- ANSI color-coded output (green for book/chapter, yellow for verse range)
133- Smart lookahead rule: extends to end of chapter if less than 12 verses remain
134- Support for Polish "Nowa Biblia Gdańska" translation (`books/pol_nbg.json``)
135- Complete test suite with edge case validation
136- `README`` documentation with usage examples and algorithm explanation
137
138### Changed
139
140- **BREAKING**: Changed from bookmark-based progression to date-based progression
141 - Previous versions used `bookmark.toml` to track reading position, new
142 version calculates position from current date
143- Restructured codebase with modular Go packages:
144 - `internal/loader.go`: JSON Bible data loading and indexing
145 - `internal/dateprogression.go`: Date-to-verse position calculation
146 - `internal/formatter.go`: ANSI color formatting and text extraction
147 - `internal/verse.go`: Data structures and constants
148 - `internal/bookmark.go`: Legacy bookmark support (unused in date-based mode)
149
150### Fixed
151
152- Proper handling of chapter and book boundaries
153- Correct modulo wrapping for yearly cycle (total 3779 Gospel verses)
154- Leap year support via Go's standard `time.YearDay()` function
155- Validation of verse ranges and error handling
156
157### Removed
158
159- OCaml implementation
160- Dependency on `bookmark.toml` file for progression
161- Regex-based verse parsing (replaced with JSON Bible data)
162
163## [0.1.0] - 2026-04-16
164
165### Added
166
167- Initial Go port of OCaml Bible verse utility
168- Bookmark-based progression system (TOML file)
169- Support for Polish "Nowa Biblia Gdańska" translation
170- Basic ANSI color formatting
171- Lookahead rule implementation
172
173### Changed
174
175- Rewritten from OCaml to Go programming language
176- Changed data format from custom to JSON
177- Improved error handling and validation