shiori
shiori copied to clipboard
feat: allow direct pdf archives
This pull request aims to provide PDF archives for bookmarks by directly downloading the file.
Notable changes
- Logic for archivers now uses the
ArchiverDomain
-
ArchiverDomain
initializes 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.
-
- Added
PDFArchiver
: Just downloads the file. - Added
WARCArchiver
as a "catch all" (current default) - Added database columns
bookmark.archiver
(warc
/pdf
) andarchive_path
.- Bookmark has an archive if
archive_path != ""
- Bookmark has an archive if
Pending
- [ ] Migrate the
archive_path
for existing bookmarks: iterate over the bookmarks, check if the archive exists and set the path and thearchiver
towarc
. - [ ] Refactor EPub logic separate from the archiver
- [x] Allow different archivers in archive page
Closes #929