[PR #1031] [CLOSED] fix: add thumbnail URL in print command #939

Closed
opened 2026-02-25 23:35:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/1031
Author: @fmartingr
Created: 12/17/2024
Status: Closed

Base: masterHead: fmartingr/fix/print-thumbnail-url


📝 Commits (3)

  • 1518055 fix: add thumbnail URL in print command
  • 08b00c2
  • 721be0a Add test for populateImageURL method in TestBookmarkDomain function

📊 Changes

5 files changed (+41 additions, -3 deletions)

View changed files

📝 internal/cmd/print.go (+1 -1)
📝 internal/domains/bookmarks.go (+9 -0)
📝 internal/domains/bookmarks_test.go (+26 -0)
📝 internal/http/routes/api/v1/bookmarks.go (+3 -0)
📝 internal/http/routes/api/v1/bookmarks_test.go (+2 -2)

📄 Description

Fixes #838

Add imageURL field to shiori print -j command and api/v1/bookmarks/ endpoint

  • BookmarksDomain: Add populateImageURL method to set ImageURL field. Update GetBookmark method to call populateImageURL method.
  • BookmarksDomain Tests: Add test for populateImageURL method in TestBookmarkDomain function.
  • API: Update getBookmark method in internal/http/routes/api/v1/bookmarks.go to include ImageURL field in response.
  • API Tests: Add test for ImageURL field in TestReadableeBookmarkContent function.
  • CLI: Update printHandler function in internal/cmd/print.go to get the bookmarks using the BookmarksDomain present in deps instead of deps.Database. Remove the loop that calls populateImageUrl.

For more details, open the Copilot Workspace session.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/1031 **Author:** [@fmartingr](https://github.com/fmartingr) **Created:** 12/17/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fmartingr/fix/print-thumbnail-url` --- ### 📝 Commits (3) - [`1518055`](https://github.com/go-shiori/shiori/commit/15180557ac1a67253690125f46699d5d03433b0d) fix: add thumbnail URL in print command - [`08b00c2`](https://github.com/go-shiori/shiori/commit/08b00c2d91028cc5e845c914f03f7b9f9bf00948) - [`721be0a`](https://github.com/go-shiori/shiori/commit/721be0adda79112a8aad31aa9b75458baaa8af9b) Add test for `populateImageURL` method in `TestBookmarkDomain` function ### 📊 Changes **5 files changed** (+41 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `internal/cmd/print.go` (+1 -1) 📝 `internal/domains/bookmarks.go` (+9 -0) 📝 `internal/domains/bookmarks_test.go` (+26 -0) 📝 `internal/http/routes/api/v1/bookmarks.go` (+3 -0) 📝 `internal/http/routes/api/v1/bookmarks_test.go` (+2 -2) </details> ### 📄 Description Fixes #838 Add `imageURL` field to `shiori print -j` command and `api/v1/bookmarks/` endpoint * **BookmarksDomain**: Add `populateImageURL` method to set `ImageURL` field. Update `GetBookmark` method to call `populateImageURL` method. * **BookmarksDomain Tests**: Add test for `populateImageURL` method in `TestBookmarkDomain` function. * **API**: Update `getBookmark` method in `internal/http/routes/api/v1/bookmarks.go` to include `ImageURL` field in response. * **API Tests**: Add test for `ImageURL` field in `TestReadableeBookmarkContent` function. * **CLI**: Update `printHandler` function in `internal/cmd/print.go` to get the bookmarks using the `BookmarksDomain` present in `deps` instead of `deps.Database`. Remove the loop that calls `populateImageUrl`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/go-shiori/shiori/pull/1031?shareId=79f161da-df4e-456f-a244-dd88f0996c0e). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:35:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#939
No description provided.