[GH-ISSUE #329] [FR] Support uploading SingleFile .html files from local filesystem. #212

Open
opened 2026-03-02 11:47:39 +03:00 by kerem · 4 comments
Owner

Originally created by @huyz on GitHub (Jul 27, 2024).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/329

Sometimes we've manually saved web pages using browser extensions like SingleFile into a single .html file. This is especially needed if the web page is behind a paywall or a login or we've already painstakingly zapped unwanted DOM elements before saving.

So it would be nice to support uploading these SingleFile .html files.

These use cases overlap with what the official Hoarder browser extension could do if it supported web-clipping functionality (https://github.com/hoarder-app/hoarder/issues/330). I think that there's a need for both. The advantage of supporting uploading local .html files from the filesystem are for uploading a cache of old SingleFile .html files we've already collected or those collected by other apps such as ArchiveBox.

Originally created by @huyz on GitHub (Jul 27, 2024). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/329 Sometimes we've manually saved web pages using browser extensions like SingleFile into a single `.html` file. This is especially needed if the web page is behind a paywall or a login or we've already painstakingly zapped unwanted DOM elements before saving. So it would be nice to support uploading these SingleFile .html files. These use cases overlap with what the official Hoarder browser extension could do if it supported web-clipping functionality (https://github.com/hoarder-app/hoarder/issues/330). I think that there's a need for both. The advantage of supporting uploading local .html files from the filesystem are for uploading a cache of old SingleFile .html files we've already collected or those collected by other apps such as ArchiveBox.
Author
Owner

@dionorgua commented on GitHub (Dec 25, 2024):

SingleFile is known to be good. I've a lot of SingleFile html files saved locally. And trying to migrate to Hoarder.

This will also 'fix/workaround' a few bugs:

Basically user knows for sure that what will be in archived content. Plus SingleFile tries to disable 'interactive' stuff so that content can be readed offline.

PS. SingleFile have new "zip" mode where html file itself is zip archive with JS unpacker. So it may be non-trivial to 'index' it. Personally I ignore it because CLI tools like elinks --dump don't produce anything. For sure first step will be to add way to manually create entry with URL and user-provided html

<!-- gh-comment-id:2561878421 --> @dionorgua commented on GitHub (Dec 25, 2024): SingleFile is known to be good. I've a lot of SingleFile html files saved locally. And trying to migrate to Hoarder. This will also 'fix/workaround' a few bugs: - https://github.com/hoarder-app/hoarder/issues/713 - https://github.com/hoarder-app/hoarder/issues/50 Basically user knows for sure that what will be in archived content. Plus SingleFile tries to disable 'interactive' stuff so that content can be readed offline. PS. SingleFile have new "zip" mode where `html` file itself is zip archive with JS unpacker. So it may be non-trivial to 'index' it. Personally I ignore it because CLI tools like `elinks --dump` don't produce anything. For sure first step will be to add way to manually create entry with URL and user-provided html
Author
Owner

@MohamedBassem commented on GitHub (Feb 17, 2025):

Hoarder as of the latest release, has native support for the singlefile extension. I think the only thing missing is allowing the users to upload the archives themseleves somewhere and somehow specify the URL associated with this file. I'm open for supporting this, if someone can suggest a nice workflow for those uploads (where to upload them, how to specify the URL, do you want mass uploads, etc).
Another easier route is to support uploading them via the CLI if this is good enough for you.
If someone wants to use hoarder's APIs directly till then, you can infer the schema from the guide here: https://docs.hoarder.app/Guides/singlefile

<!-- gh-comment-id:2662608847 --> @MohamedBassem commented on GitHub (Feb 17, 2025): Hoarder as of the latest release, has native support for the singlefile extension. I think the only thing missing is allowing the users to upload the archives themseleves somewhere and somehow specify the URL associated with this file. I'm open for supporting this, if someone can suggest a nice workflow for those uploads (where to upload them, how to specify the URL, do you want mass uploads, etc). Another easier route is to support uploading them via the CLI if this is good enough for you. If someone wants to use hoarder's APIs directly till then, you can infer the schema from the guide here: https://docs.hoarder.app/Guides/singlefile
Author
Owner

@dionorgua commented on GitHub (Feb 17, 2025):

I've checked some of my singlefile HTML files and all of them starts with followed:

<!DOCTYPE html> <html lang=en data-darkreader-mode=dynamic data-darkreader-scheme=dark style><!--
 Page saved with SingleFile 
 url: https://example.com/test.html
 saved date: Tue Feb 27 2024 17:09:11 GMT+0100 (Central European Standard Time)

So it could happens that we can detect it automatically.

<!-- gh-comment-id:2662679180 --> @dionorgua commented on GitHub (Feb 17, 2025): I've checked some of my singlefile HTML files and all of them starts with followed: ``` <!DOCTYPE html> <html lang=en data-darkreader-mode=dynamic data-darkreader-scheme=dark style><!-- Page saved with SingleFile url: https://example.com/test.html saved date: Tue Feb 27 2024 17:09:11 GMT+0100 (Central European Standard Time) ``` So it could happens that we can detect it automatically.
Author
Owner

@maelp commented on GitHub (Mar 23, 2025):

It would be nice to have an option in the app or a cli or a script to batch-upload previous SingleFile archives! I have many, and I'd rather have them on Hoarder now :)

<!-- gh-comment-id:2746206661 --> @maelp commented on GitHub (Mar 23, 2025): It would be nice to have an option in the app or a cli or a script to batch-upload previous SingleFile archives! I have many, and I'd rather have them on Hoarder now :)
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/karakeep#212
No description provided.