gildas-lormeau / SingleFile

Web Extension for saving a faithful copy of a complete web page in a single HTML file
GNU Affero General Public License v3.0
14.78k stars 972 forks source link

Could you support WebDAV? #979

Closed WolfgangDpunkt closed 2 years ago

WolfgangDpunkt commented 2 years ago

Describe the solution you'd like It would be great if this great tool could support WebDAV. This would suddenly make a much larger number of storage destinations usable. It would also be possible to use privacy-friendly self-hosted options, such as Nextcloud.

Is your feature request related to a problem? Please describe. I am writing this because Google Drive works very unreliably for me (#978)

Thank you for considering this possibility.

By the way, there are browser extensions where the use of WebDAV works very well, maybe this example will help: https://github.com/floccusaddon/floccus

gildas-lormeau commented 2 years ago

I have to take a look on how to implement it, it might be much simpler than I initially expected. FYI, you're not the only one to request this feature (https://github.com/gildas-lormeau/SingleFileZ/issues/103).

WolfgangDpunkt commented 2 years ago

Wonderful! I am pleased that this could be a relevant feature for others.

I'm not a developer, but it seems to me that there are even ready-made libraries that could be used for this?

Maybe useful:

webdav - WebDAV client written in JavaScript for NodeJS and the browser unifile - NodeJS library to access cloud storage which supports WebDAV

(found here)

gildas-lormeau commented 2 years ago

I'm trying to do some tests with OneDrive but I cannot get them to work for now. Do you use a browser extension uploading files to OneDrive? If not, which provider do you use?

WolfgangDpunkt commented 2 years ago

Thank you very much for your effort! I have no experience with WebDAV via Onedrive, but I just tried it briefly and had no success either.

If I may make a suggestion: I would test it with Nextcloud, because most users who want to use WebDAV probably use a self-hosted cloud with Nextcloud (like me, for data protection and data sovereignty reasons).

If you're kind enough to try it out, here's an easy way: Fortunately, there is a freely available demo version for Instant trial. I tried it successfully with the browser addon Floccus.

https://try.nextcloud.com

Automatic login data is generated that is valid for one hour.

Now you have all the necessary access data and can check via the Nextcloud interface whether the files have arrived.

gildas-lormeau commented 2 years ago

@WolfgangDpunkt Thank you also so much for your help! I did a test with Nextcloud and I confirm it works as expected. Unfortunately they don't display HTML pages in their interface but it's another problem.

WolfgangDpunkt commented 2 years ago

That sounds very good, I'm glad it's working out. I'm already looking forward to the new WebDAV function. Thanks a lot for your great work.

I at least use Nextcloud only as storage for syncing, so the saved web pages will end up on my mobile phone or desktop computer anyway.

gildas-lormeau commented 2 years ago

It's implemented in the version 1.21.17 which should be available for download on the Mozilla Store before the week-end hopefully.

WolfgangDpunkt commented 2 years ago

I am simply thrilled! It works perfectly and super fast.

I would like to express my heartfelt thanks to you. Within a few days you have added this incredibly useful enhancement in a wonderful way.

And it even works to specify subdirectories, simply append the folder to the WebDAV url (.../SingleFileFolder). At least with Nextcloud, the saved articles reliably end up in the subfolder.

Once again, thank you very much. You couldn't imagine better and faster support, even for a commercial product. You do enormously valuable work.

gildas-lormeau commented 2 years ago

I'm glad to hear that the feature works for you. In this respect, it's a bit of a win-win. Your help has also been invaluable, including the ability to test on NextCloud. By the way, note that you can also include directories in the filename template. For example, it is possible to group pages by day using this template {date-locale}/{page-title} ({time-locale}).html.

I thank you for your review and your donation. It is an effort I really appreciate.

Finally, I apologize for the poor and incomplete German translation, I'm just plain bad even though it's officially my first foreign language.

WolfgangDpunkt commented 2 years ago

Many thanks for the kind words and advice. Übrigens ist die Übersetzung ziemlich gut sogar, mir ist noch kein größerer Fehler aufgefallen :-)