all repos — bibel @ 24fb7ab0d94eef6e9a9dab5d2553b861096d5889

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