[PR #775] [MERGED] refactor: migrate bookmark static pages to new http server #783

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

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/775
Author: @fmartingr
Created: 11/11/2023
Status: Merged
Merged: 12/28/2023
Merged by: @fmartingr

Base: masterHead: feat/bookmark-http-new


📝 Commits (10+)

  • e08a22c migrate bookmark content route to new http server
  • 4159d5e new archive page
  • 776b86b Merge remote-tracking branch 'origin/master' into feat/bookmark-http-new
  • 46f5645 Merge remote-tracking branch 'origin/master' into feat/bookmark-http-new
  • 1b49d90 remove unused go generate comment
  • bb84c19 database mock
  • 600e741 utils cleanup
  • 887d23f unused var
  • 68f12ef domains refactor and tests
  • 7a2ad09 Merge remote-tracking branch 'origin/master' into feat/bookmark-http-new

📊 Changes

65 files changed (+1319 additions, -916 deletions)

View changed files

📝 Makefile (+5 -0)
📝 docs/Configuration.md (+30 -12)
📝 go.mod (+1 -1)
📝 go.sum (+2 -0)
📝 internal/cmd/add.go (+2 -2)
📝 internal/cmd/check.go (+1 -1)
📝 internal/cmd/import.go (+2 -2)
📝 internal/cmd/pocket.go (+2 -2)
📝 internal/cmd/root.go (+8 -4)
📝 internal/cmd/server.go (+5 -2)
📝 internal/cmd/update.go (+2 -2)
📝 internal/cmd/utils.go (+1 -1)
📝 internal/config/config.go (+3 -3)
internal/config/dependencies.go (+0 -25)
📝 internal/core/ebook.go (+7 -8)
📝 internal/core/ebook_test.go (+55 -57)
📝 internal/core/processing.go (+14 -42)
📝 internal/core/processing_test.go (+31 -56)
📝 internal/database/database.go (+3 -3)
📝 internal/database/database_test.go (+15 -15)

...and 45 more files

📄 Description

  • Migrate /bookmark/:id/content to new http server
  • Migrate /bookmark/:id/thumb to new http server
  • Migrate /bookmark/:id/archive to new http server
    • Refactor archive bookmark template to be a static file with an iframe to the actual archive rather than modifying the archive HTML to include arbitrary HTML
  • Rename symbol model.Bookmark into model.BookmarkDTO to prepare future changes
  • Create BookmarkDomain to perform operations with Bookmarks
    • HasEbook
    • HasArchive
    • GetThumbnailPath
    • HasThumbnail
    • GetBookmark
    • GetBookmarkContentsFromArchive
  • ArchiverDomain
    • GetBookmarkArchive
  • StorageDomain
  • Domain unit testing
  • Database mock
  • Use afero as filesystem abstraction

Fixes #751


🔄 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/775 **Author:** [@fmartingr](https://github.com/fmartingr) **Created:** 11/11/2023 **Status:** ✅ Merged **Merged:** 12/28/2023 **Merged by:** [@fmartingr](https://github.com/fmartingr) **Base:** `master` ← **Head:** `feat/bookmark-http-new` --- ### 📝 Commits (10+) - [`e08a22c`](https://github.com/go-shiori/shiori/commit/e08a22c5bf807b43226b92d194209f0e939b6087) migrate bookmark content route to new http server - [`4159d5e`](https://github.com/go-shiori/shiori/commit/4159d5e810735fa4b5e99e8d2d659d9d4e70caca) new archive page - [`776b86b`](https://github.com/go-shiori/shiori/commit/776b86ba5303165c3c43b4cb9949af07f8ead968) Merge remote-tracking branch 'origin/master' into feat/bookmark-http-new - [`46f5645`](https://github.com/go-shiori/shiori/commit/46f56454014397d8713219cc821fa2233093c6c1) Merge remote-tracking branch 'origin/master' into feat/bookmark-http-new - [`1b49d90`](https://github.com/go-shiori/shiori/commit/1b49d90ede7eaa7898012721cbb21cc68fa2179d) remove unused go generate comment - [`bb84c19`](https://github.com/go-shiori/shiori/commit/bb84c19c47d794e8679db3b38f89e8b1e9695062) database mock - [`600e741`](https://github.com/go-shiori/shiori/commit/600e74192705809f58b12122d83862569cebf0fa) utils cleanup - [`887d23f`](https://github.com/go-shiori/shiori/commit/887d23fab2115c3deb0889157cef7ab837f0b4e4) unused var - [`68f12ef`](https://github.com/go-shiori/shiori/commit/68f12efb33a486133da999da0f031a4d2eb397dd) domains refactor and tests - [`7a2ad09`](https://github.com/go-shiori/shiori/commit/7a2ad09d7ecf574feb20158cf900b9d1578f4af4) Merge remote-tracking branch 'origin/master' into feat/bookmark-http-new ### 📊 Changes **65 files changed** (+1319 additions, -916 deletions) <details> <summary>View changed files</summary> 📝 `Makefile` (+5 -0) 📝 `docs/Configuration.md` (+30 -12) 📝 `go.mod` (+1 -1) 📝 `go.sum` (+2 -0) 📝 `internal/cmd/add.go` (+2 -2) 📝 `internal/cmd/check.go` (+1 -1) 📝 `internal/cmd/import.go` (+2 -2) 📝 `internal/cmd/pocket.go` (+2 -2) 📝 `internal/cmd/root.go` (+8 -4) 📝 `internal/cmd/server.go` (+5 -2) 📝 `internal/cmd/update.go` (+2 -2) 📝 `internal/cmd/utils.go` (+1 -1) 📝 `internal/config/config.go` (+3 -3) ➖ `internal/config/dependencies.go` (+0 -25) 📝 `internal/core/ebook.go` (+7 -8) 📝 `internal/core/ebook_test.go` (+55 -57) 📝 `internal/core/processing.go` (+14 -42) 📝 `internal/core/processing_test.go` (+31 -56) 📝 `internal/database/database.go` (+3 -3) 📝 `internal/database/database_test.go` (+15 -15) _...and 45 more files_ </details> ### 📄 Description - [x] Migrate `/bookmark/:id/content` to new http server - [x] Migrate `/bookmark/:id/thumb` to new http server - [x] Migrate `/bookmark/:id/archive` to new http server - [x] Refactor archive bookmark template to be a static file with an iframe to the actual archive rather than modifying the archive HTML to include arbitrary HTML - [x] Rename symbol `model.Bookmark` into `model.BookmarkDTO` to prepare future changes - [x] Create `BookmarkDomain` to perform operations with Bookmarks - [x] `HasEbook` - [x] `HasArchive` - [x] `GetThumbnailPath` - [x] `HasThumbnail` - [x] `GetBookmark` - [x] `GetBookmarkContentsFromArchive` - [x] `ArchiverDomain` - [x] `GetBookmarkArchive` - [x] `StorageDomain` - [x] Domain unit testing - [x] Database mock - [x] Use [`afero`](https://github.com/spf13/afero) as filesystem abstraction Fixes #751 --- <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:27 +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#783
No description provided.