mirror of
https://github.com/go-shiori/shiori.git
synced 2026-04-24 22:15:52 +03:00
[PR #1178] [PoC] Pluggable Archiver Proof-of-Concept #1030
Labels
No labels
component:backend
component:builds
component:builds
component:extension
component:frontend
component:readability
database
database:mysql
database:postgres
database:sqlite
feature:ebooks
github_actions
good first issue
hacktoberfest
note:duplicate?
note:fixed?
note:out-of-scope?
os:windows
priority:high
priority:low
pull-request
resolution:as-intended
resolution:cant-reproduce
resolution:duplicate
resolution:fixed
resolution:wontfix
tag:TBD
tag:big-task
tag:help-wanted
tag:huge-data
tag:meta
tag:more-info
tag:next
tag:no-stale
tag:requires-migrations
tag:research
tag:security 🛡️
tag:stale
tag:waiting-for-assignee
type:bug
type:documentation
type:enhancement
type:meta
type:ux
user:cli
user:web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shiori#1030
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/go-shiori/shiori/pull/1178
Author: @honsiorovskyi
Created: 1/4/2026
Status: 🔄 Open
Base:
master← Head:pluggable-archiver📝 Commits (8)
9341definitial refactoring961a62efix testae85422cleanup66a9f0emove HasArchive to the ArchiverDomain9f2216aexternal archiver PoCf4f2254fix external archivera8c4588adapt delete command839e236fixes📊 Changes
20 files changed (+529 additions, -125 deletions)
View changed files
📝
Makefile(+10 -0)📝
internal/cmd/delete.go(+7 -3)📝
internal/cmd/root.go(+6 -1)➖
internal/core/core.go(+0 -5)📝
internal/core/download.go(+3 -1)📝
internal/core/processing.go(+1 -22)➖
internal/domains/archiver.go(+0 -55)➕
internal/domains/archiver_builtin.go(+81 -0)➕
internal/domains/archiver_external.go(+276 -0)📝
internal/domains/bookmarks.go(+2 -7)📝
internal/domains/bookmarks_test.go(+16 -14)📝
internal/http/handlers/bookmark.go(+2 -2)📝
internal/http/handlers/bookmark_test.go(+27 -1)➕
internal/model/archiver.go(+75 -0)📝
internal/model/bookmark.go(+1 -0)📝
internal/model/domains.go(+4 -4)📝
internal/model/main.go(+6 -0)📝
internal/testutil/shiori.go(+1 -1)📝
internal/webserver/handler-api-ext.go(+5 -4)📝
internal/webserver/handler-api.go(+6 -5)📄 Description
Hello Shiori team! 👋
First of all, thank you for this project, I absolutely love the idea and how lightweight it is.
However, in the modern world, some things can't be
nicedone purely in Go and stay lightweight.One example is archiving some heavy pages where content is rendered by JS fetching data from some API (e.g. the very Github 🙈). Thus, it seems, there's no way to avoid using some kind of web engine, rendering the page, running the JS and then capturing properly rendered DOM.
Another one would be archiving something like YT videos, where you'd need to run the whole yt-dlp stack to get the actual content.
At the same time, the approach of using such 3rd party suites has a set of drawbacks:
Of course, one could live without such archival (or use another project altogether), but it became interesting to me to check what would take to implement an elegant-ish solution to make it possible to keep Shiori small, easy and lightweight yet make it optionally extensible with external plugins to enable integrations with external archivers.
Something like this:

The idea is to, alongside with the internal already existing archiver, have an external one — either completely replacing the built-in one if the user opts in, or working in parallel with it (thus, enabling both local and external archival). They both would implement a very simple internal interface, and the external archiver would just be exposing that interface over some kind of a transport (probably regular REST API would be the go to approach, but there are options here).
Then the external archiver / multiplexer service (a completely separate thing, not coupled to Shiori in any way) would be running on a separate machine (or on the same machine — wherever the user chooses to deploy it) and routing the archival requests to the backends it supports (and the user decided to configure).
This PR very simple proof-of-concept with the external archiver that doesn't implement any specific transport yet, but just calls an external binary (it was just the easiest way to implement and test it — I still think it makes more sense to use some kind of a network transport for that instead).
Please keep in mind that this is a PoC and I don't have intentions to merge it as is (hence, publishing it as a draft).
However, if you like the idea and would provide some feedback on it, I'd be glad to continue working in this direction and eventually come up with a PR that would implement the external archiver part (the one inside the Shiori box) fitting the project structure, aligned with the roadmap, nicely coded, properly documented and covered with tests 🤞 😃
Hope it all makes sense. I'll also try to explain some code decisions in the inline comments in the PR itself.
Cheers!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.