all repos — bibel @ 24fb7ab0d94eef6e9a9dab5d2553b861096d5889

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

24fb7ab0
feat: add XDG data directory support for automatic Bible file discovery

- Add XDG data directory support (`internal/config.go`)
  - Automatically search `$XDG_DATA_HOME/bibel` for JSON files when
    `bible_path` is empty
  - Implement `findBibleFileInDataDir()` to locate first `.json` file
  - Print confirmation message when using Bible file from XDG data
    directory
  - Provide helpful error messages when directory missing or no JSON
    files found
- Change default configuration (`configs/config.example.toml`)
  - Set `bible_path` to empty string (uses XDG-standard data directory)
  - Update documentation comments to explain XDG behavior
- Improve error handling (`internal/dateprogression.go`)
  - Add check for zero total verses to prevent divide-by-zero panic
  - Return clear error when Bible file lacks books for selected reading
    mode
- Update `--generate-config` flag to create config with empty
  `bible_path` for XDG compatibility
- Revise `README.md` to document XDG data directory usage and update
  project structure
- Add `CHANGELOG.md` entry for version 1.5.0 with XDG support,
  configuration changes, and fixed edge cases
Maxwell Jensen 85795372+maxwelljens@users.noreply.github.com
Fri, 17 Apr 2026 17:31:50 +0200
9410cd8d
feat: add multiple reading modes and dynamic book name support

- Add `-r/--reading` command line option for reading scope selection
  - Support four modes: `evangelion` (default, Gospels only),
    `new_testament`, `old_testament`, `bible`
  - Overrides `reading_mode` setting in configuration file
- Enhance date progression to work with any Bible book range
  - `NewDateProgressionWithReadingMode()` accepts `ReadingMode`
    parameter
  - `getBookRange()` returns start/end books for each mode
  - Wrap correctly at boundaries of selected reading scope
- Remove hardcoded Polish book names from `BookIndex.String()`
  - Book names now read directly from JSON `book_name` field
  - `Formatter` requires `*Bible` parameter to retrieve book names
    dynamically
  - Update all formatter calls in `cmd/bibel.go` and `tui/model.go`
- Add `reading_mode` to TOML configuration (`config.toml`)
  - Validate against allowed values in `Config.Validate()`
  - Apply default `"evangelion"` for empty or missing values
- Fix configuration unmarshalling: apply defaults for empty fields
  - Handle empty `ReadingMode`, `OutputMode`, `BiblePath`,
    `BorderStyle`, `VersesPerDay`
- Update `README.md` and example config to document new reading modes
- Deprecate `GetTotalGospelVerses()` in favour of
  `GetTotalVersesForMode()`
Maxwell Jensen 85795372+maxwelljens@users.noreply.github.com
Fri, 17 Apr 2026 16:33:41 +0200
01c758ad
feat: add TOML configuration system with flexible output modes and customisation

- Add configuration system using Viper and go-toml (`internal/config.go`)
  - Support XDG base directory spec (`~/.config/bibel/config.toml`)
  - Implement `LoadConfig()`, `SaveConfig()`, `GenerateDefaultConfig()`
  - Validate output modes, border styles, verses per day
- Introduce three output modes: `tui` (default), `formatted` (ANSI), `plain`
  - Add `--formatted` and `--plain` CLI flags, plus `--generate-config`
  - Auto-detect terminal and fallback from `tui` to `formatted` when not a TTY
- Make verses per day configurable (`date_progression.verses_per_day`)
  - Update `DateProgression` to use configurable value in offset calculation
  - Replace all hardcoded `12` references with `dp.versesPerDay`
  - Adjust lookahead rule to use configured verses per day
- Add configurable TUI styling (`[tui]` section)
  - Border style: `rounded`, `double`, `single`, `hidden`
  - Custom colours for border, header, text, quit message (hex or named)
  - Option to hide the "Press q to quit..." message (`show_quit_message`)
- Make formatter header template configurable (`[formatter]` section)
  - Support variables: `{book}`, `{chapter}`, `{first_verse}`, `{second_verse}`
  - Allow disabling ANSI colours (`use_colours`)
- Update dependencies:
  - Add `github.com/spf13/viper`, `github.com/adrg/xdg`, `github.com/pelletier/go-toml/v2`
  - Remove unused indirect dependencies (e.g., `charmbracelet/colorprofile`, `x/term`)
- Add `configs/config.example.toml` as reference configuration
- Update `README.md` with full configuration documentation and new CLI usage
- Refactor code to pass `*Config` struct instead of separate flags
  - Remove `plainMode` boolean from TUI model, use `outputMode` field
  - Add `NewFormatterWithConfig`, `NewDateProgressionWithConfig`
Maxwell Jensen 85795372+maxwelljens@users.noreply.github.com
Fri, 17 Apr 2026 11:47:22 +0200
d229be0e
refactor: correct README and if/else to max
Maxwell Jensen 85795372+maxwelljens@users.noreply.github.com
Thu, 16 Apr 2026 20:09:32 +0200
0be549fc
feat: add interactive TUI with bubbletea and lipgloss

- Add TUI framework using `bubbletea` v0.24.0 for interactive terminal
interface
  - New `internal/tui/model.go` with bubbletea model and lipgloss
styling
  - Styled output with rounded borders, adaptive colours (light/dark
terminal)
  - Show "Press q to quit..." message below verse box
- Add smart TTY detection in `cmd/bibel.go`
  - Launch interactive TUI when stdout is a terminal
  - Fall back to formatted ANSI output in non‑interactive environments
  - Preserve `-p/--plain` flag to output plain verse text only
- Update dependencies: add `bubbletea` and `lipgloss`, remove indirect
`go-toml`
- Revise `README.md` to document TUI features, controls, and multiple
output modes
- Update `CHANGELOG.md` with version 1.2.0 and detailed changes
- Clean up formatting and add missing newlines at EOF in several
internal files
Maxwell Jensen 85795372+maxwelljens@users.noreply.github.com
Thu, 16 Apr 2026 19:34:18 +0200
8c9758c2
feat: add argument parsing and plain output flag

- Add command-line argument parsing using `go-arg` library
  - Define `Args` struct with `Plain` flag (`-p/--plain`)
  - Implement `Description()` method for program help text
  - Parse arguments in `main()` before loading Bible data
- Add `-p/--plain` flag to output plain text without chapter name or
verse numbers
  - Conditionally skip header formatting when flag is set
- Update `.gitignore` to exclude `bibel` binary
- Remove obsolete `bibel_date` binary and `bookmark.toml` file
- Update `CHANGELOG.md` with version 1.1.0 entry documenting new
features
- Add `github.com/alexflint/go-arg` and `go-scalar` dependencies to
`go.mod` and `go.sum`
Maxwell Jensen 85795372+maxwelljens@users.noreply.github.com
Thu, 16 Apr 2026 17:08:38 +0200
9696757c
feat: replace bookmark-based progression with date-based daily verses

- Remove bookmark persistence system and TOML dependency
  - Delete `internal/bookmark.go` and all bookmark manager logic
  - Remove `github.com/pelletier/go-toml/v2` from `go.mod`
  - Delete `test/bookmark.toml` and `invalid_bookmark.toml`
- Add date-based progression (`internal/dateprogression.go`)
  - Calculate reading position from day of year (12 verses per day)
  - Wrap yearly through all four Gospels (3779 total verses)
  - Apply lookahead rule when fewer than 12 verses remain in chapter
- Update `cmd/bibel.go` to use `DateProgression` instead of
`BookmarkManager`
  - Display today's verses without reading or writing any bookmark file
  - Support test dates via `GOOSE_TEST_DATE` environment variable
- Revise `README.md` to document date-based algorithm and usage
- Add `CHANGELOG.md` with version 1.0.0 and complete migration notes
- Clean up `.gitignore` (remove editor/IDE and old_code.ml entries)
- Keep `old_code.ml` as reference for original OCaml implementation
Maxwell Jensen 85795372+maxwelljens@users.noreply.github.com
Thu, 16 Apr 2026 16:36:42 +0200
963a6d5d
First commit
Maxwell Jensen 85795372+maxwelljens@users.noreply.github.com
Thu, 16 Apr 2026 15:27:15 +0200