summaryrefslogtreecommitdiff
path: root/internal/readings/readings.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-24 09:15:40 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-24 09:15:40 +0200
commitb93de95dd24ff2a1d3126e6d7d00cd77530a03bf (patch)
tree483a0901a20274152ba3f03f272f8098be4f49c0 /internal/readings/readings.go
parentc1b954ad517cef00bf480d5229b253a8c6524be7 (diff)
downloadlectio-b93de95dd24ff2a1d3126e6d7d00cd77530a03bf.tar.gz
lectio-b93de95dd24ff2a1d3126e6d7d00cd77530a03bf.zip
tradlit: offline caching + read; update pre-caches traditional; --clean prunes it; v0.2.0
Diffstat (limited to 'internal/readings/readings.go')
-rw-r--r--internal/readings/readings.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/internal/readings/readings.go b/internal/readings/readings.go
index 82d2fb9..ac7209a 100644
--- a/internal/readings/readings.go
+++ b/internal/readings/readings.go
@@ -5,7 +5,6 @@
package readings
import (
- "fmt"
"strings"
"github.com/lukaszkasprzak/lectio/internal/config"
@@ -21,7 +20,8 @@ type Options struct {
// (modern lectionary only; see liturgy.Options.Refresh).
Refresh bool
// Offline restricts Load to previously cached/harvested data, never
- // hitting the network. Traditional+Offline is not yet supported.
+ // hitting the network (both lectionaries; see liturgy.Options.Offline
+ // and tradlit.Load's offline parameter).
Offline bool
// All, when true, keeps every part the config doesn't explicitly hide;
// when false, only the gospel is kept.
@@ -38,10 +38,7 @@ func Load(cfg config.Config, opts Options) ([]liturgy.Section, error) {
var err error
if cfg.Lectionary == "traditional" {
- if offline {
- return nil, fmt.Errorf("readings: offline traditional not yet supported; use lectionary=new offline")
- }
- secs, err = tradlit.Load(opts.Date, cfg.TraditionalLang)
+ secs, err = tradlit.Load(opts.Date, cfg.TraditionalLang, offline)
} else {
secs, err = liturgy.Load(liturgy.Options{
Date: opts.Date,