all repos — bibel @ 4d989dbd3374640c4671c3a77cc588c4fb078be0

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