all repos — bibel @ 995003ab506a7dc2fc1a212da5b5d9bd2cdd58ad

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

internal/verse.go (view raw)

 1package bible
 2
 3import (
 4	"fmt"
 5)
 6
 7// Verse represents a single Bible verse
 8type Verse struct {
 9	BookName string `json:"book_name"`
10	Book     int    `json:"book"`
11	Chapter  int    `json:"chapter"`
12	VerseNum int    `json:"verse"`
13	Text     string `json:"text"`
14}
15
16// VerseRange represents a range of verses (inclusive)
17type VerseRange struct {
18	Book       int
19	Chapter    int
20	FirstVerse int
21	LastVerse  int
22}
23
24// BookIndex represents Bible book numbers
25type BookIndex int
26
27// BookIndex.String returns the string representation of the book index.
28// Note: The actual book name should be retrieved from Bible data using the Formatter.
29// This is kept for backward compatibility but returns a simple numeric representation.
30func (b BookIndex) String() string {
31	// Return numeric representation - actual book names should come from Bible data
32	return fmt.Sprintf("Book %d", b)
33}
34
35// ReadingMode defines the scope of Bible reading
36type ReadingMode string
37
38const (
39	ReadingModeEvangelion   ReadingMode = "evangelion"    // Books 40-43 (Matthew, Mark, Luke, John)
40	ReadingModeNewTestament ReadingMode = "new_testament" // Books 40-66
41	ReadingModeOldTestament ReadingMode = "old_testament" // Books 1-39  
42	ReadingModeBible        ReadingMode = "bible"         // Books 1-66
43)
44
45// Bookmark represents the current reading position
46type Bookmark struct {
47	Book        BookIndex `toml:"book"`
48	Chapter     int       `toml:"chapter"`
49	FirstVerse  int       `toml:"first_verse"`
50	SecondVerse int       `toml:"second_verse"`
51}