From b93de95dd24ff2a1d3126e6d7d00cd77530a03bf Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Fri, 24 Jul 2026 09:15:40 +0200 Subject: tradlit: offline caching + read; update pre-caches traditional; --clean prunes it; v0.2.0 --- internal/readings/readings.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'internal/readings/readings.go') 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, -- cgit v1.3