all repos — bibel @ 78abfb5e4966de8ab9439d9ca9a09a85bef4b149

Unnamed repository; edit this file 'description' to name the repository.

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