Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: readium/go-toolkit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.6.0
Choose a base ref
...
head repository: readium/go-toolkit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: develop
Choose a head ref

Commits on Jan 11, 2025

  1. Copy the full SHA
    d935e76 View commit details

Commits on Feb 1, 2025

  1. Copy the full SHA
    35b2fd9 View commit details
  2. Copy the full SHA
    f3dc16e View commit details
  3. Copy the full SHA
    ae55aca View commit details
  4. Bump github/codeql-action from 3.27.6 to 3.28.0 (#173)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Henry <chocolatkey@gmail.com>
    dependabot[bot] and chocolatkey authored Feb 1, 2025
    Copy the full SHA
    d244440 View commit details
  5. Bump actions/upload-artifact from 4.4.3 to 4.5.0 (#172)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Henry <chocolatkey@gmail.com>
    dependabot[bot] and chocolatkey authored Feb 1, 2025
    Copy the full SHA
    fcd77cd View commit details
  6. Bump actions/setup-go from 5.1.0 to 5.2.0 (#170)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Henry <chocolatkey@gmail.com>
    dependabot[bot] and chocolatkey authored Feb 1, 2025
    Copy the full SHA
    e221b19 View commit details
  7. Bump docker/setup-buildx-action from 3.7.1 to 3.8.0 (#171)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Henry <chocolatkey@gmail.com>
    dependabot[bot] and chocolatkey authored Feb 1, 2025
    Copy the full SHA
    d45cf62 View commit details
  8. Bump golang from ef30001 to 2e83858 (#174)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 1, 2025
    Copy the full SHA
    8166c0a View commit details
  9. Copy the full SHA
    f46a800 View commit details
  10. Copy the full SHA
    7026cb8 View commit details
  11. Copy the full SHA
    2c2ae2c View commit details
  12. Bump actions/setup-go from 5.2.0 to 5.3.0 (#190)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Henry <chocolatkey@gmail.com>
    dependabot[bot] and chocolatkey authored Feb 1, 2025
    Copy the full SHA
    a1104de View commit details
  13. Bump github/codeql-action from 3.28.0 to 3.28.8 (#189)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Henry <chocolatkey@gmail.com>
    dependabot[bot] and chocolatkey authored Feb 1, 2025
    Copy the full SHA
    1500704 View commit details
  14. Bump actions/upload-artifact from 4.5.0 to 4.6.0 (#187)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Henry <chocolatkey@gmail.com>
    dependabot[bot] and chocolatkey authored Feb 1, 2025
    Copy the full SHA
    cc1aeb1 View commit details
  15. Bump step-security/harden-runner from 2.10.2 to 2.10.4 (#188)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Henry <chocolatkey@gmail.com>
    dependabot[bot] and chocolatkey authored Feb 1, 2025
    Copy the full SHA
    368aacb View commit details

Commits on Feb 7, 2025

  1. fixes for EAA exemptions

    chocolatkey committed Feb 7, 2025
    Copy the full SHA
    de610d7 View commit details
  2. fix a11y test

    chocolatkey committed Feb 7, 2025
    Copy the full SHA
    9c7334c View commit details
  3. Copy the full SHA
    a89c47e View commit details

Commits on Feb 20, 2025

  1. Copy the full SHA
    e10c19d View commit details
  2. Copy the full SHA
    32b2154 View commit details

Commits on Feb 21, 2025

  1. Fix Docker build

    chocolatkey committed Feb 21, 2025
    Copy the full SHA
    44a37e6 View commit details
  2. cloud build test 1

    chocolatkey committed Feb 21, 2025
    Copy the full SHA
    b15865c View commit details
  3. cloud build test 2

    chocolatkey committed Feb 21, 2025
    Copy the full SHA
    0929180 View commit details
  4. Copy the full SHA
    f035f88 View commit details
  5. cloud build test 3

    chocolatkey committed Feb 21, 2025
    Copy the full SHA
    6c53fb9 View commit details
  6. Copy the full SHA
    48883e3 View commit details
  7. Copy the full SHA
    d24a115 View commit details
  8. Copy the full SHA
    9748370 View commit details
  9. Copy the full SHA
    1a8d2ff View commit details
  10. Bump goreleaser/goreleaser-action from 5.1.0 to 6.2.1 (#196)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 21, 2025
    Copy the full SHA
    e903edc View commit details
  11. Copy the full SHA
    500aa9f View commit details

Commits on Feb 24, 2025

  1. Update changelog

    chocolatkey committed Feb 24, 2025
    Copy the full SHA
    6b2f2dd View commit details

Commits on Feb 25, 2025

  1. Fix builds for arm

    chocolatkey committed Feb 25, 2025
    Copy the full SHA
    43c0638 View commit details
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -15,14 +15,14 @@ jobs:
runs-on: [self-hosted, arm64]
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: '>=1.23.0'
cache: false
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit

@@ -50,7 +50,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -60,7 +60,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/autobuild@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -73,6 +73,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit

13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ jobs:
runs-on: [self-hosted, arm64]
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit

@@ -27,12 +27,12 @@ jobs:
fetch-depth: 0
- run: git fetch --force --tags
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: '>=1.23.0'
cache: false
- name: Build release
uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5.1.0
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6.2.1
with:
distribution: goreleaser
version: latest
@@ -43,7 +43,7 @@ jobs:
runs-on: [self-hosted, arm64]
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit

@@ -53,9 +53,9 @@ jobs:
fetch-depth: 0
- run: git fetch --force --tags
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
- name: Build and push Docker image
run: docker buildx build --platform=linux/amd64,linux/arm64,linux/arm/v7 . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
run: docker buildx build --platform=linux/amd64,linux/arm64,linux/arm/v7 . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" --build-arg NO_SNAPSHOT=true
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push image
@@ -73,4 +73,5 @@ jobs:
echo VERSION=$VERSION
docker buildx build --push \
--tag $IMAGE_ID:$VERSION \
--build-arg NO_SNAPSHOT=true \
--platform linux/amd64,linux/arm64,linux/arm/v7 .
6 changes: 3 additions & 3 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit

@@ -63,14 +63,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
with:
sarif_file: results.sarif
28 changes: 15 additions & 13 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Make sure to check the documentation at https://goreleaser.com
version: 2
before:
hooks:
- go mod tidy
- go generate ./...
gomod:
proxy: true
builds:
- main: ./cmd/rwp/
env:
@@ -13,21 +16,20 @@ builds:
- linux
- windows
- darwin
goarch:
- '386'
- amd64
- arm
- arm64
goarm:
- '7'
goamd64:
- v3

# - main: ./cmd/server/
# env:
# - CGO_ENABLED=0
# id: rwp-server
# binary: rwp-server
# goos:
# - linux
# - windows
# - darwin
ldflags:
- -s -w

archives:
- format: tar.gz
- formats: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
# Used to start with {{ .ProjectName }}
name_template: >-
@@ -40,8 +42,8 @@ archives:
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
formats: ['zip']
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
version_template: "{{ incpatch .Version }}-next"
39 changes: 38 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -6,4 +6,41 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

TODO
## [0.8.1] - 2025-02-24

### Changed

- Docker containers & releases now properly build ARM (32-bit) images with v7 (not v6) support

## [0.8.0] - 2025-02-24

### Added

- Support for [EPUB Accessibility 1.1](https://www.w3.org/TR/epub-a11y-11/) conformance values
- `--version` flag for `rwp`
- Output of `go-toolkit` version in WebPub metadata. [Based on the Go module pseudo-version](https://github.com/readium/go-toolkit/issues/80#issuecomment-2673888192)

### Changed

- A11y `conformsTo` values are now sorted from highest to lowest conformance level

## [0.7.1] - 2025-02-07

### Added

- Add [TDMRep](https://www.w3.org/community/reports/tdmrep/CG-FINAL-tdmrep-20240510/#sec-epub3) support for EPUB 2 & 3.

### Fixed

- Fix typo in EAA exemption.

## [0.7.0] - 2025-01-31

### Added

- Implement support for [EPUB accessibility exemptions](https://www.w3.org/TR/epub-a11y-exemption/), with output in WebPub manifests

### Changed

- The a11y feature `printPageNumbers` has been renamed to `pageNavigation` as per #92
- Dependencies were updated to latest versions, code adjustments were made for changes in pdfcpu
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM --platform=$BUILDPLATFORM golang:1-bookworm@sha256:ef30001eeadd12890c7737c26f3be5b3a8479ccdcdc553b999c84879875a27ce AS builder
FROM --platform=$BUILDPLATFORM golang:1-bookworm@sha256:3149bc5043fa58cf127fd8db1fdd4e533b6aed5a40d663d4f4ae43d20386665f AS builder
ARG BUILDARCH TARGETOS TARGETARCH
ARG NO_SNAPSHOT=false

# Install GoReleaser
RUN wget --no-verbose "https://github.com/goreleaser/goreleaser/releases/download/v1.26.2/goreleaser_1.26.2_$BUILDARCH.deb"
RUN dpkg -i "goreleaser_1.26.2_$BUILDARCH.deb"
RUN wget --no-verbose "https://github.com/goreleaser/goreleaser/releases/download/v2.7.0/goreleaser_2.7.0_$BUILDARCH.deb"
RUN dpkg -i "goreleaser_2.7.0_$BUILDARCH.deb"

# Create and change to the app directory.
WORKDIR /app
@@ -17,12 +18,15 @@ RUN go mod download
# Copy local code to the container image.
COPY . ./

RUN git describe --tags --always

# RUN git lfs pull && ls -alh publications

# Run goreleaser
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg \
GOOS=$TARGETOS GOARCH=$TARGETARCH goreleaser build --single-target --id rwp --skip=validate --snapshot --output ./rwp
GOOS=$TARGETOS GOARCH=$TARGETARCH GOAMD64=v3 GOARM=7 \
goreleaser build --single-target --id rwp --skip=validate $(case "$NO_SNAPSHOT" in yes|true|1) ;; *) echo "--snapshot";; esac) --output ./rwp

# Run tests
# FROM builder AS tester
6 changes: 4 additions & 2 deletions cmd/rwp/cmd/root.go
Original file line number Diff line number Diff line change
@@ -3,13 +3,15 @@ package cmd
import (
"os"

"github.com/readium/go-toolkit/pkg/util/version"
"github.com/spf13/cobra"
)

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "rwp",
Short: "Utilities for Readium Web Publications",
Use: "rwp",
Short: "Utilities for Readium Web Publications",
Version: version.Version,
}

// Execute adds all child commands to the root command and sets flags appropriately.
28 changes: 14 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
module github.com/readium/go-toolkit

go 1.22
go 1.22.0

toolchain go1.23.4
toolchain go1.23.5

require (
github.com/CAFxX/httpcompression v0.0.9
github.com/agext/regexp v1.3.0
github.com/andybalholm/cascadia v1.3.2
github.com/andybalholm/cascadia v1.3.3
github.com/deckarep/golang-set v1.8.0
github.com/go-viper/mapstructure/v2 v2.1.0
github.com/go-viper/mapstructure/v2 v2.2.1
github.com/gorilla/mux v1.8.1
github.com/gotd/contrib v0.21.0
github.com/pdfcpu/pdfcpu v0.5.0
github.com/pdfcpu/pdfcpu v0.9.1
github.com/pkg/errors v0.9.1
github.com/readium/xmlquery v0.0.0-20230106230237-8f493145aef4
github.com/relvacode/iso8601 v1.6.0
@@ -21,26 +21,26 @@ require (
github.com/trimmer-io/go-xmp v1.0.0
github.com/vmihailenco/go-tinylfu v0.2.2
github.com/zeebo/xxh3 v1.0.2
golang.org/x/exp v0.0.0-20240529005216-23cca8864a10
golang.org/x/net v0.32.0
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c
golang.org/x/net v0.34.0
golang.org/x/text v0.21.0
)

require (
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/antchfx/xpath v1.2.1 // indirect
github.com/andybalholm/brotli v1.1.1 // indirect
github.com/antchfx/xpath v1.3.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/hhrutter/lzw v1.0.0 // indirect
github.com/hhrutter/tiff v1.0.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/image v0.18.0 // indirect
golang.org/x/sys v0.28.0 // indirect
github.com/spf13/pflag v1.0.6 // indirect
golang.org/x/image v0.23.0 // indirect
golang.org/x/sys v0.29.0 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Loading