All notable changes to this project will be documented in this file.
Warning: Features marked as alpha may change or be removed in a future release without notice. Use with caution.
- The mimetype for OPUS is now the modern
audio/opus, to align with the other toolkits - The mimetype string matcher now removes spaces, so that
audio/ogg; codecs=opusandaudio/ogg;codecs=opusare the same when searching for a match
- Fixed race condition causing local file reads to fail due to early closure
- The
ConformsTofunction on manifests (and by extension, publications) mistakenly checked the manifest'slinks, not itsreadingOrder, for mediatypes that determine whether the manifest is conforming to a certain profile. This may have caused mistaken cases of a11y inferrence or Divina/Audiobook/EPUB/PDF profile detection.
- Fixed a typo in the accessibility metadata (
describeMathshould bedescribedMath). - File fetcher (for exploded local publications) would panic due to runtime cleanup bug
- Fetcher for archives and exploded publications were not able to retrieve resources at paths containing special characters, such as spaces
- Now that we not longer make full releases on GitHub for the go-toolkit, it's confusing to have
https://github.com/readium/go-toolkit/releasesas the JSON key for the toolkit version in manifests. The new value ishttps://github.com/readium/go-toolkit#version
- Implemented zran-like reading of ZIP entries. This only applies to the start offset, not the total length of the resources. Particularly useful for e.g. streaming compressed videos where a browser will send
Range: bytes=0-then abort when satisfied, which is already hopeless for us to handle. At least when users scrub through video/audio, we can take aRange: bytes=XXXXXX-header and start the remote range request for the resource closer to the start of the byte range. This happens in increments of 1MB - Add CRC32 checksum function for
CompressedResourceto make direct copying of compressed resources to new archives easier
- Fixed bugged
Readcalls that aren't obligated to return the entirety of a resource. This was resulting in errors when reading partial ranges of resources, most notably ones that are range-read by browsers such as audio and video
- Updated dependencies
- If the
linksarray in a manifest is empty, it was set tonullwhen the manifest was serialized to JSON. Now, it is not included, which is the proper behavior
All services are now hidden by default. This mainly affects implementers creating webservers, but you also shouldn't need to manually remove services just to produce clean manifest output. To restore previous functionality, set the streamer.Config's AddServiceLinks to true
- ServicesBuilder now has a convenience function
Servicesto get the names of all services currently in the builder - ServicesBuilder now has a
ExposeLinksandHideLinksfunction to toggle the exposure of a service via the links that get added to the WebPub manifest, as well as access to the service via its well-known link path. By default, services are private streamer.Confighas a new property,AddServiceLinks. Setting this property is equivalent to calling the aforementionedExposeLinksfunction for every service
ServiceFactorynow has a requiredpublicproperty. This lets a service expose itself via theGetandLinksfunction if set to true. This also means that by default, all services are now "private". That means they will not be added to manifests as links, or callable by said link's path. They are still directly accessible in Go code using e.g.Publication.FindService, and then directly calling their functions by casting them to the correct service type (see e.g.Publication.Positions)- Upgraded dependencies
The WebPub data the toolkit parses and provides has been updated to more closely match the latest WebPub spec. Pay close attention to these changes if you depend on the WebPub output in reading systems/libraries that use an older version of the spec!
- ServicesBuilder now has a convenience function
RemoveExceptto remove unecessary services easily metadata.altIdentifiers, an array of alternative publication identifiers. Populated for EPUBs, current logic is rudamentarycontributor.altIdentifiers, an array of alternative contributor identifiers. Populated for EPUBs, current logic is rudamentarymetadata.layout, along with logic to figure out its effective value depending on the publication type. This replacesmetadata.presentation.layout. It includes the newscrolledvalue for TTB content like webtoons
metadata.readingProgressioncan only beltr,rtl, or empty.auto,ttb,bttare not recognized anymore
metadata.presentationno longer exists. Any properties that were parsed from EPUB will be available as keys in the metadata, using the full namespace + key URL, for examplehttp://www.idpf.org/vocab/rendition/#orientation- Link properties no longer contains helpers for
fit,clipped,orientation,overflow,spread,layoutvalues, as they are no longer recognized
- Potential bug in FileFetcher regarding OS file handle cleanup made safer
- OnCreatePublication function added to Streamer config
- Upgraded dependencies
- Streamer was ignoring
InferIgnoredImagesparameter
- New config option available when creating a
Streamer:InferIgnoredImages, a list of hashes of images to ignore when when inferring nonvisual reading analyzer.MatchImagefunction that compares an image link's hashes with given hashes to check for a matchHashValuehas newStringandEqualconvenience functions.HashListhas a newFindconvenience function.
- Renamed
analyzer.Imagetoanalyzer.InspectImage - Slight adjustments to behavior of manifest properties functions
- Adds missing switch cases for WCAG 2.2 strings when inferring accessibility
- Pick up a11y metadata that's nested (due to
refinesproperty) in OPFmetaelements
- The
cmdfolder has been removed, along with therwpcommand and its command-line utilities including the web server. Please use the new Readium CLI repo as a replacement. The docker build and executable releases are also now migrated to that repository, and therwpverbiage is nowreadium.
- Remote streaming of publications is now supported. Sources include HTTP servers (capable of byte range requests), Amazon S3 and S3-compatible object storage, Google Cloud Storage (GCS)
- Added a new helper to transform fetchers and resources into interfaces compatible with Go's
fs.FSandfs.File - Add support for
hashproperty in links, with a list of recognized algorithms and utility functions - A new
analyzerpackage has been added that supports image analysis. We're not 100% sure this will remain in the toolkit, it could migrate to the cli repository.
- In order to support remote streaming, a lot of APIs have been altered to accept a
context.Contextas the first parameter, to provide implementers with the ability to e.g. cancel a request to fetch a resource. ReadAsString,ReadAsJSON, andReadAsXMLfunctions have been removed fromResourceand are instead available as helper functions.
- Docker containers & releases now properly build ARM (32-bit) images with v7 (not v6) support
- Support for EPUB Accessibility 1.1 conformance values
--versionflag forrwp- Output of
go-toolkitversion in WebPub metadata. Based on the Go module pseudo-version
- A11y
conformsTovalues are now sorted from highest to lowest conformance level
- Add TDMRep support for EPUB 2 & 3.
- Fix typo in EAA exemption.
- Implement support for EPUB accessibility exemptions, with output in WebPub manifests
- The a11y feature
printPageNumbershas been renamed topageNavigationas per #92 - Dependencies were updated to latest versions, code adjustments were made for changes in pdfcpu