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## [0.11.0] - 2026-04-18
12
13### Added
14
15- **New flag**: `-v/--verbose` flag to print with more information if needed.
16
17### Fixed
18
19- Add missing newlines at end of `easterprogression.go` and `config.go`
20 (cosmetic)
21
22## [0.10.0] - 2026-04-18
23
24### Changed
25
26- **ANSI colour**: Changed from hex colour codes to ANSI terminal colours
27- Removed light/dark mode detection and adaptive colour logic
28- Changed "Adaptive Styling" to "ANSI Colours" in `README`
29
30### Removed
31
32- Removed `border_colour`, `header_colour`, `text_colour`, `quit_colour` from
33TOML configuration
34- `HasDarkBackground()` check and `lightDark()` helper function
35- All `#RRGGBB` colour codes (replaced with ANSI codes)
36
37## [0.9.0] - 2026-04-17
38
39### Added
40
41- **Easter progress bar**: Fancy progress bar at bottom of TUI showing time
42until Easter, which is configurable; Orthodox (default) or Roman Catholic.
43Shows days/hours/minutes until next Easter with percentage progress.
44- New `-l/--latin` flag to use Roman Catholic Easter instead of Eastern
45Orthodox.
46- Added vendored `eastertime` package with accurate Orthodox and Roman Catholic
47algorithms for telling Easter time.
48- **Configuration option**: `easter_type` configuration field in TOML (default:
49"orthodox")
50
51## [0.8.0] - 2026-04-17
52
53### Added
54
55- **Verse numbering option**: New `-n/--numbered` flag prints each verse on a
56numbered line with verse number
57- **Paragraph handling option**: New `-g/--paragraphs` flag renders pilcrows
58(¶) as blank lines instead of ignoring them
59- **TUI numbered styling**: Verse numbers use darker shade styling via
60`lipgloss` for better readability
61- **Configuration integration**: Both options configurable via TOML file in
62`[formatter]` section (`numbered` and `paragraphs` fields)
63
64### Changed
65
66- **Formatter system enhanced**: New `FormatSnippetWithOptions()` and
67`FormatSnippetForTUI()` methods for advanced formatting
68- **TUI width handling**: Improved width calculations for numbered verses to
69prevent text clipping
70- **Paragraph logic refined**: Fixed newline handling to only insert blank
71lines for pilcrows, not between all verses
72- **Phased out short flag**: `--generate-config` no longer has the `-g` short
73flag. This is now under `--paragraphs`.
74
75## [0.7.0] - 2026-04-17
76
77### Added
78
79- **XDG data directory support**: Automatic Bible file discovery in
80`$XDG_DATA_HOME/bibel`
81 - When `bible_path` is empty in configuration, program searches
82 `$XDG_DATA_HOME/bibel` for JSON files
83 - Uses first `.json` file found in the directory. Provides helpful error
84 messages when directory or Bible files are missing.
85- **Cross-platform Bible data management**: Leverages `xdg` library for
86consistent data directory paths across platforms
87
88### Changed
89
90- **Default configuration**: `bible_path` now defaults to empty string (uses
91XDG-stadnard data directory)
92- **Example configuration**: Updated `config.example.toml` with documentation
93about XDG data directory usage
94- **Error handling**: Improved error messages for missing Bible data files
95
96### Fixed
97
98- **Configuration generation**: `--generate-config` flag creates config with
99empty `bible_path` for XDG compatibility
100- **Edge case handling**: Prevent crashes when Bible file doesn't contain books
101for selected reading mode
102- **Date progression robustness**: Added check for zero total verses to prevent
103divide-by-zero panics
104
105## [0.6.0] - 2026-04-17
106
107### Added
108
109- **Multiple reading modes** via new `-r/--reading` command line option:
110 - `evangelion` (default): Gospels only (Matthew, Mark, Luke, John)
111 - `new_testament`: Entire New Testament (books 40-66)
112 - `old_testament`: Old Testament only (books 1-39)
113 - `bible`: The entire Bible (books 1-66)
114- **Flexible Bible source support**: Can now work with any Bible translation
115 - Removed hardcoded Polish book names
116 - Reads `book_name` field directly from JSON data
117
118### Changed
119
120- **Date progression system enhanced**:
121 - `NewDateProgressionWithReadingMode()` accepts reading mode parameter
122 - Calculates verse positions based on selected reading scope
123 - Proper wrapping at boundaries of each reading mode
124- **Formatter now requires Bible reference**:
125 - `NewFormatterWithConfig()` now accepts `*Bible` parameter
126 - Formatter retrieves book names dynamically from loaded Bible data
127 - Updated all formatter initialization calls in codebase
128- **Book name handling refactored**:
129 - Removed `polishBookNames` map from `verse.go`
130 - `BookIndex.String()` returns numeric fallback representation
131 - Actual book names sourced from Bible JSON metadata
132- **Configuration system enhanced**:
133 - Added `reading_mode` configuration option with validation
134 - Command line `-r/--reading` overrides config setting
135 - Improved default value handling for empty configuration fields
136
137### Fixed
138
139- **Configuration validation**: Allow empty reading mode during initial load
140- **Build errors**: Fixed Go compilation issues in configuration unmarshalling
141- **Backward compatibility**: Maintains existing behavior for default mode
142
143## [0.5.0] - 2026-04-17
144
145### Added
146
147- **TOML configuration file** system with XDG Base Directory Specification
148compliance
149 - Configuration file location: `$XDG_CONFIG_HOME/bibel/config.toml` (default:
150 `~/.config/bibel/config.toml`). macOS and Windows also supported.
151 - Uses `xdg` for XDG compliance and `viper` for configuration management
152- **Configuration generation**: `--generate-config` flag creates default
153configuration file
154- **Comprehensive TUI aesthetic configuration**:
155 - `border_style`: "rounded", "double", "single", or "hidden"
156 - `border_colour`: Custom hex colour for box borders
157 - `header_colour`: Custom hex colour for header text
158 - `text_colour`: Custom hex colour for verse content
159 - `quit_colour`: Custom hex colour for quit message
160 - `show_quit_message`: Boolean to show/hide "Press q to quit..." message
161- **Formatter configuration**:
162 - `header_format`: Customisable header template with variables: `{book}`,
163 `{chapter}`, `{first_verse}`, `{second_verse}`
164 - `use_colours`: Enable/disable ANSI colour output in formatted mode
165- **Date progression configuration**:
166 - `verses_per_day`: Customisable number of verses per day (default: 12)
167- **Command-line override**: CLI flags (`--plain`, `--formatted`) override
168configuration settings
169- **Configuration validation**: Ensures valid output modes, border styles, and
170positive verse counts
171
172### Changed
173
174- **Formatter behaviour**: `FormatHeader()` now reads `header_format` from
175configuration instead of hardcoded format
176- **TUI styling**: All aesthetic properties (colours, border style) now
177configurable via TOML file
178- **Date progression**: `NewDateProgressionWithConfig()` accepts custom
179`verses_per_day` parameter
180- **Application flow**: Configuration loaded before processing, with
181command-line arguments taking precedence
182- **Package structure**: Added `internal/config.go` for configuration
183management
184
185## [0.4.0] - 2026-04-16
186
187### Added
188
189- **TUI framework** using `bubbletea` for interactive terminal user interface
190- **Styled output** with `lipgloss` for terminal-adaptive colours and borders
191- **Interactive mode**: Verse displayed in a rounded border box with "Press q
192to quit..." message
193- **Smart TTY detection**: Automatically falls back to formatted output in
194non-interactive environments
195- **Enhanced argument handling**: `-p/--plain` now outputs plain text without
196TUI or formatting
197- **New package structure**: `internal/tui/` containing TUI model and styling
198components
199
200### Changed
201
202- **Program flow**: Default mode now launches interactive TUI when run in a
203terminal
204- **Plain mode behaviour**: `--plain` flag now outputs only verse text (no
205header or TUI)
206- **Terminal detection**: Non-TTY environments show formatted output with ANSI
207colours
208- **Dependencies**: Added `bubbletea` and `lipgloss` for TUI functionality
209
210## [0.3.0] - 2026-04-16
211
212### Added
213
214- Argument parsing using `go-arg` library
215- `-p/--plain` flag to output plain text without chapter name or verse numbers
216- Program description and help text
217
218## [0.2.0] - 2026-04-16
219
220### Added
221
222- Complete Go migration from original OCaml implementation
223- Date-based Bible verse progression system
224 - Calculates position based on day of year (1st January = Matthew 1:1-12)
225 - Shows 12 verses per day, cycling through all four Gospels yearly
226- ANSI color-coded output (green for book/chapter, yellow for verse range)
227- Smart lookahead rule: extends to end of chapter if less than 12 verses remain
228- Support for Polish "Nowa Biblia Gdańska" translation (`books/pol_nbg.json``)
229- Complete test suite with edge case validation
230- `README`` documentation with usage examples and algorithm explanation
231
232### Changed
233
234- **BREAKING**: Changed from bookmark-based progression to date-based progression
235 - Previous versions used `bookmark.toml` to track reading position, new
236 version calculates position from current date
237- Restructured codebase with modular Go packages:
238 - `internal/loader.go`: JSON Bible data loading and indexing
239 - `internal/dateprogression.go`: Date-to-verse position calculation
240 - `internal/formatter.go`: ANSI color formatting and text extraction
241 - `internal/verse.go`: Data structures and constants
242 - `internal/bookmark.go`: Legacy bookmark support (unused in date-based mode)
243
244### Fixed
245
246- Proper handling of chapter and book boundaries
247- Correct modulo wrapping for yearly cycle (total 3779 Gospel verses)
248- Leap year support via Go's standard `time.YearDay()` function
249- Validation of verse ranges and error handling
250
251### Removed
252
253- OCaml implementation
254- Dependency on `bookmark.toml` file for progression
255- Regex-based verse parsing (replaced with JSON Bible data)
256
257## [0.1.0] - 2026-04-16
258
259### Added
260
261- Initial Go port of OCaml Bible verse utility
262- Bookmark-based progression system (TOML file)
263- Support for Polish "Nowa Biblia Gdańska" translation
264- Basic ANSI color formatting
265- Lookahead rule implementation
266
267### Changed
268
269- Rewritten from OCaml to Go programming language
270- Changed data format from custom to JSON
271- Improved error handling and validation