- 💻 Added the
--pericopes
option totoday categories
to list the scripture that is included with each category. - Added support for chapters in a canon that do not start with verse 1. This can happen in filtered canons with excludes in some cases. In any case, it is supported now.
- 🔨 💻 Fix: The
--exclude
option totoday random
is now actually implemented. - 🔨 Correct the way verse exclusion is performed to fix certain cases where a verse exclusion was only partially applied, which resulted in a panic.
- Upgrade dependencies. No features or fixes.
- 🔨 💻 Fix: The previous fix didn't go far enough. This one causes exclusions to merged recursively, which completely resolves the problem, but might not be very performant.
- 🔨 💻 Fix: When verses were excluded using an option like
--exclude
or--exclude-index
, the exclusion would sometimes fail with an error like "unable to find last verse while excluding [reference]" due to a failure to merge adjacent references during the exclusion process. This has been fixed. - Minor upgrade to third party dependencies.
- 💻 The
today ost index
command has been added to pull down scripture indexes from openscripture.today. - 💻 Added
--exclude
and--exclude-index
options totoday random
. - ESV text from VerseText and others won't include the references now.
- Updating the Verse and Photo file formats used by the
ost.Client
for the upcoming version of openscripture.today. Adding aost.Metadata
structure that records version, original verseion, and whether the verse and photo have been pruned. - A new
VersesIndex
has been added to theost.Client
for fetching indexes listing all the verses that have been postd for certain periods (all time, year, month). - Added a
Clone
method toref.Canon
andref.Book
to create deep clones of these objects. - Added the
ref.ExcludeReferences
option for use with theref.Random
functions. - Added a
Subtract
method toref.Resolved
to return the difference between two resolved references. - Added a
Filtered
method toref.Canon
that returns a new canon that has segments references removed. - 💥 Breaking Change 💥: Now requires Go 1.22.
- 💥 Breaking Change 💥: Significant changes have been made to the photos API. These changes include the following:
- The
photo.Meta
andphoto.Info
structures have been removed/merged/refactored intophoto.Descriptor
. - A new interface named
photo.Image
has been added and eachphoto.Descriptor
should have at least one, but may have many associatedphoto.Image
objects. - Interaction with the images associated with a
photo.Descriptor
is handled through the methods namedAddImage
,RemoveImage
,HasImage
, andGetImage
. - Every
photo.Iamge
implementation must also implement either or both ofphoto.ImageReader
orphoto.ImageDecoded
. - When stored with a
photo.Descriptor
, thephoto.Image
is transformed into aphoto.ImageComplete
if it is not one already. - The
photo.Iamge
interface required aFilename
method to be implemented. - The
photo.ImageReader
interface requires aReader
method to be implemented. - The
photo.ImageDecoded
interface requires aImage
method to be implemented. - The
photo.ImageComplete
interface is a union ofphoto.ImageReader
andphoto.ImageDecoded
. - The
photo.CompleteImage
and associatedphoto.Complete
function are provided to transform anyphoto.Image
into aphoto.ImageComplete
(or return it as is if it already is such). - The
photo.Service
no longer requires aCacheKey
method to be implemented. - The
photo.Service
no longer requires aDownload
method to be implemented as that funcationlity should be handled viaphoto.Image
. - The
photo.DominantImageColor
function has been added, replacing the removedDominantImageColor
method ofphoto.Service
. - The
ost.Client
returnsphoto.Descriptor
objects instead ofphoto.Info
objects. - Mirroring the API in Golang's built-in
image
package, aphoto.RegisterEncoder
function has been added to allow for automatic encoding. This includes the "jpeg" encoding by default and thephoto.DefaultEncoding
is used in situations when no encoding has been pre-selected, which is set to "jpeg" format. - A general purpose implementation of
photo.Image
/photo.ImageDecoded
is provided inphoto.Memory
. - A general purpose implementation of
photo.Image
/photo.ImageReader
is provided inphoto.File
. - Every
photo.Descriptor
should define an image for thephoto.Original
key, which should provide a full-size, original image. - The
photo.FromImage
option has been added for use with theResizeImage
method ofphoto.Service
, which selects whichphoto.Image
associated with aphoto.Descriptor
should be used as the source image for resizing.
- The
- New utility function
unsplash.IDFromURL()
added which will give you the photo ID from an Unsplash photo URL. - 🔨 Fix: Multiple total chapter references will be resolved to chapter ranges. For example, if you parse "Ps. 12-13", the resolver will correctly return "Psalms 12-13" instead of "Psalms 12:1-13:6" as it would have before.
- 🔨 Fix: Psalms singular handling has been special cased so that references to a single verse can show something like "Psalm 12" or "Psalm 12:1-3" rather than "Psalms 12" or "Psalms 12:1-3" as it would have before.
- 🔨 Fix: Photo descriptors were not being correctly written to JSON files prior to this version. They were missing the "creator" key and embedding the name of the creator in the structure above. This has been corrected.
- 🔨 Fix: Verse JSON files were not written correctly either prior to this version. They were missing the "version" key and embedding the name of the version in the parent structure. This has been fixed.
- 🔨 Fix: The ESV resolver returns cleaner verse references now.
- 💻 The
today show
command supports most common book abbreviations now. - The
text.Service
allows for the canon and the abbreviations used to be configured using thetext.WithCanon
,text.WithAbbreviations
, andtext.WithoutAbbreviations
options. The service still usesref.Canonical
by default and now usesref.Abbreviations
by default. - Addeded a
CompactRef()
method toref.Resolved
to return a compact string representation of the reference. (For example, Genesis 12:4-12:6 would be Genesis 12:4-6 or Genesis 12:1-20 would be Genesis 12.) - Addeda a
LastVerseInChapter()
method toref.Book
to return the last verse in a chapter (or in the case of a chapterless book like Obadiah or Philemon, the last verse in the book). - Added the
ref.BookAbbreviations
structure with associated components and thePreferredAbbreviation()
andBookName()
methods to assist with abbreviating and parsing abbreviated book names. - Added a standard set of abbreviations in
ref.Abbreviations
. - Added options to the
Resolve()
method ofref.Canon
, the first (and only, for now) option isref.WithAbbreviations()
to select another set of abbreviations (rather than using ref.Abbreviations as is the default) or to use no abbreviations at all viaref.WithoutAbbreviations()
. - Added the resolve options to the
Book()
method ofref.Canon
as well. - Added a low-level interface called
ref.AbbrTree
for quickly resolving abbreviated book names. - ❓💥 Potentially Breaking Change: Implementations of
ref.Absolute
now must implement theFullNameRef()
andAbbreviatedRef()
methods.
- 💥 Breaking Change 💥: The
ref.RandomPassage
aneref.RandomPassageFromRef
functions now take two additional integer arguments to select width of range returned. - 💥 Breaking Change 💥: The
ost.Verse
structure has been moved totext.Verse
. It has also been restructured to include aLink
field and the HTMLContent
field has been replaced with a structure that containsText
andHTML
fields. - 💥 Breaking Change 💥: The
text.Service
has changed substantially:- Methods
Verse
,VerseText
,VerseHTML
,RandomVerse
,RandomVerseText
, andRandomVerseHTML
now require acontext.Context
argument. - The
Verse
method has been renamed toVerseText
and a newVerse
method that returnstext.Verse
has been added. - The
RandomVerse
method has been renamed toRandomVerseText
and a newRandomVerse
method that returnstext.Verse
has been added.
- Methods
- 💥 Breaking Change 💥: The
text.Resolver
interface has changed substantially:- Requires a
context.Context
argument for all methods. - Requires a
VersionInformation
method. - Renamed
Verse
toVerseText
and a newVerse
method that returnstext.Verse
has been added.
- Requires a
- 💥 Breaking Change 💥: The
esv.Resolver
implements newtext.Resolver
changes. - 💥 Breaking Change 💥: The
ost.Version
structure has been moved totext.Version
. - 💥 Breaking Change 💥: The
ost.Client
methodsToday
,TodayVerse
,TodayHTML
, andTodayPhoto
now require acontext.Context
argument. - Added the
--minimum-verses
and--maximum-verses
options totoday random
to allow control over how many verses are selected for the passage. - Added
ref.WithAtLeast()
andref.WithAtMost()
options toref.Random
to allow control over how many verses are selected for the passage. - Added a field for loading and saving the preferred color of an image to
photo.Meta
and theSetColor
method for convertingcolor.Color
to a CSS hex color code andGetColor
to perform the same operation in reverse. - When checking for dominant color in a photo, black and white are generally disqualified.
- 🔨 Fix: Fixed a bug where the
today random
output showed the passage reference twice. - 🔨 Fix: Random passages should now be unbiased (previously, there was a slight bias towards picking passages at the end of a book or passage).
- 💻 Adding a
today openscripture photo
command with--download
,--on
, and--yaml
flags for downloadinng and fetching metadata regarding the photo for the scripture of the day from openscripture.today. - Added the
TodayPhoto
command to theost
package for pulling photos from openscripture.today. - Added the
photo
andunsplash
packages for working with photos, which are used to support theost
change and the CLI change, but also have future uses.
- 💻 Renaming
openscripture.today
toopenscripture
and addingtoday
as a subcommand. (Both the upper level and sub-command do the same thing as the previousopenscripture.today
command.) - 💻 Adding an
opensripture on
command to fetch previous scriptures of the day from openscripture.today. - When parsing ranges, allow various unicode hyphens, not just U+002D.
- 💻 Added the
version
command to track which version is installed. - 💻 Added the
openscripture.today
(withost
alias) to allow for showing the scripture of the day from openscripture.today. - Added the API library in
pkg/ost
for working with the openscripture.today API. - 🔨 Fix: There was a bug were resolution did not properly check to ensure that the verse was in the canon.
- Initial release.
- Provides a library for working with Bible references in
pkg/ref
- Provides a tool for retrieving Biblical text from the ESV API
- 💻 Provides a command-line tool named
today
- 💻 The
today
command can list books in the Protestant canon - 💻 The
today
command can list books by categories (of my selection) - 💻 The
today
command can retrieve a random passage from the ESV - 💻 The
today
command can show a specific passage from the ESV