mirror of
https://github.com/go-shiori/shiori.git
synced 2026-04-24 22:15:52 +03:00
[PR #942] feat: allow direct pdf archives #883
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#883
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/942
Author: @fmartingr
Created: 6/25/2024
Status: 🔄 Open
Base:
master← Head:feat/pdf-archiver📝 Commits (10+)
0896957feat: new pdf archiver1fe353earchiver, archiver type8f7837dmysql pg migrations3f27d7citerate archivers if errorda41211fixed getbookmark9d34badbasic archive pagec8dd55darchive page978be82bookmark logic8455991swaggere08334bebook logic📊 Changes
27 files changed (+602 additions, -155 deletions)
View changed files
📝
docs/swagger/docs.go(+6 -0)📝
docs/swagger/swagger.json(+6 -0)📝
docs/swagger/swagger.yaml(+4 -0)➕
internal/archiver/pdf.go(+57 -0)➕
internal/archiver/warc.go(+78 -0)📝
internal/cmd/add.go(+11 -27)📝
internal/core/ebook.go(+8 -3)📝
internal/core/ebook_test.go(+9 -45)📝
internal/core/processing.go(+5 -4)📝
internal/database/database_test.go(+7 -2)📝
internal/database/migrations.go(+4 -2)➕
internal/database/migrations/0001_migrate_archiver.go(+141 -0)➕
internal/database/migrations/mysql/0011_bookmark_archiver.up.sql(+3 -0)➕
internal/database/migrations/postgres/0003_bookmark_archiver.up.sql(+3 -0)➕
internal/database/migrations/sqlite/0005_bookmark_archiver.up.sql(+2 -0)📝
internal/database/mysql.go(+19 -6)📝
internal/database/pg.go(+25 -9)📝
internal/database/sqlite.go(+14 -6)📝
internal/domains/archiver.go(+49 -8)📝
internal/domains/bookmarks_test.go(+1 -1)...and 7 more files
📄 Description
This pull request aims to provide PDF archives for bookmarks by directly downloading the file.
Notable changes
ArchiverDomainArchiverDomaininitializes a list of archivers that try to match the content type, if it does, that archiver is used. If an error is raised, the next archiver is used and so on.PDFArchiver: Just downloads the file.WARCArchiveras a "catch all" (current default)bookmark.archiver(warc/pdf) andarchive_path.archive_path != ""Pending
archive_pathfor existing bookmarks: iterate over the bookmarks, check if the archive exists and set the path and thearchivertowarc.Closes #929
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.