all repos — bibel @ 22bb3a6ab182daf32755b4316471ff8c8f4a4fe6

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