From 9ebde866008a82cb6bee4741e41fd37cf3ada3ba Mon Sep 17 00:00:00 2001 From: Rob Brazier <2453018+RobBrazier@users.noreply.github.com> Date: Mon, 24 Aug 2026 19:56:51 +0100 Subject: [PATCH 1/3] add support for hardcover pat --- README.md | 4 +++- internal/feed/hardcover.go | 6 +++--- internal/hardcover/client.go | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9f00ff9..b07675d 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,12 @@ Copy the example environment file and configure your settings: cp .env.example .env ``` -Edit the `.env` file to set your configuration: + Edit the `.env` file to set your configuration: - `PORT`: The port to run the server on (default: 8000) - `HARDCOVER_TOKEN`: Your Hardcover API token (required for development) +To generate a Hardcover API token, visit [https://hardcover.app/account/api/keys/new?scope=read%3Acatalog%3Adata+read%3Alibrary%3Apublic+read%3Ausers+read%3Asocial] to create a new token with the required permissions pre-selected. + ### Installation Install dependencies: diff --git a/internal/feed/hardcover.go b/internal/feed/hardcover.go index b24d56d..86a74ed 100644 --- a/internal/feed/hardcover.go +++ b/internal/feed/hardcover.go @@ -344,13 +344,13 @@ func (b *hardcoverBuilder) getUserInterests( earliest := now.AddDate(-2, 0, 0) log.Info().Msg("Fetching user interests") data, err := hardcover.UserInterests(ctx, b.client, username, earliest) + if err != nil { + return interests, err + } log.Info(). Dur("elapsed", time.Since(now)). Int("count", len(data.UserBooks)). Msg("Retrieved user interests") - if err != nil { - return interests, err - } if len(data.Users) == 0 { return interests, nil } diff --git a/internal/hardcover/client.go b/internal/hardcover/client.go index a9ce83d..9b1b0e6 100644 --- a/internal/hardcover/client.go +++ b/internal/hardcover/client.go @@ -20,7 +20,7 @@ func (t *authTransport) RoundTrip(req *http.Request) (*http.Response, error) { req.Header.Set("Authorization", t.key) req.Header.Set( "User-Agent", - fmt.Sprintf("bookfeed/%s (https://github.com/RobBrazier/bookfeed)", version), + fmt.Sprintf("bookfeed/%s (https://github.com/robbrazier/bookfeed)", version), ) return t.wrapped.RoundTrip(req) } From e941dbd458fa404f5ed07b04f8c6a0e2473ff877 Mon Sep 17 00:00:00 2001 From: Rob Brazier <2453018+RobBrazier@users.noreply.github.com> Date: Mon, 24 Aug 2026 19:57:53 +0100 Subject: [PATCH 2/3] fix readme markdown --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b07675d..676bf3b 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ cp .env.example .env - `PORT`: The port to run the server on (default: 8000) - `HARDCOVER_TOKEN`: Your Hardcover API token (required for development) -To generate a Hardcover API token, visit [https://hardcover.app/account/api/keys/new?scope=read%3Acatalog%3Adata+read%3Alibrary%3Apublic+read%3Ausers+read%3Asocial] to create a new token with the required permissions pre-selected. +To generate a Hardcover API token, visit [https://hardcover.app/account/api/keys/new?scope=read%3Acatalog%3Adata+read%3Alibrary%3Apublic+read%3Ausers+read%3Asocial]() to create a new token with the required permissions pre-selected. ### Installation From 7493dc60fc86ece87da9e5c67e470e73fb95a18f Mon Sep 17 00:00:00 2001 From: Rob Brazier <2453018+RobBrazier@users.noreply.github.com> Date: Mon, 24 Aug 2026 19:58:53 +0100 Subject: [PATCH 3/3] guess github markdown doesn't support empty implied links --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 676bf3b..c49e442 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ cp .env.example .env - `PORT`: The port to run the server on (default: 8000) - `HARDCOVER_TOKEN`: Your Hardcover API token (required for development) -To generate a Hardcover API token, visit [https://hardcover.app/account/api/keys/new?scope=read%3Acatalog%3Adata+read%3Alibrary%3Apublic+read%3Ausers+read%3Asocial]() to create a new token with the required permissions pre-selected. +To generate a Hardcover API token, visit https://hardcover.app/account/api/keys/new?scope=read%3Acatalog%3Adata+read%3Alibrary%3Apublic+read%3Ausers+read%3Asocial to create a new token with the required permissions pre-selected. ### Installation