SingleFileZ icon indicating copy to clipboard operation
SingleFileZ copied to clipboard

Add a no zip option

Open hahaleyile opened this issue 4 years ago • 11 comments

Is your feature request related to a problem? Please describe. In some situations, I just want to keep the html file and resource files, and I don't want to compress them.

Describe the solution you'd like Add an option in extension, which can save the url as a directory other than a zip file. Because sometimes I need to organize files by my own, and unzip html file is an extra step which can be simplified by just adding an option.

hahaleyile avatar Aug 24 '21 03:08 hahaleyile

I may be wrong, but isn't this how the "Save page as..." feature works?

gildas-lormeau avatar Aug 26 '21 20:08 gildas-lormeau

I may be wrong, but isn't this how the "Save page as..." feature works?

It's strange, I remember I post the issue on "SingleFileZ" project :joy:

I think "Save page as..." function actually don't work well.

image

In screenshot, the layout is terrible and the picture don't show up correctly, because the image link is still URL link but not local file link.

image

It's no doubt your software's function is better than the original one. "Save page as..." feature is terrible.

hahaleyile avatar Aug 27 '21 02:08 hahaleyile

I transferred the issue in the repository of SingleFileZ. I understand your concern. I need some time to think about it. The problem is that the very principle of the extension is to generate a simple zip file. The code was not particularly designed to do what you want either.

gildas-lormeau avatar Aug 27 '21 10:08 gildas-lormeau

Thank you!

hahaleyile avatar Aug 27 '21 11:08 hahaleyile

Having the option not to create a zip and instead create an output directory would be useful.

For example, if I am downloading multiple pages (e.g., all pages of a small website), I sometimes need to rewrite URLs in the saved pages to point to the local saved copy (so that I can browse the website offline). To do this, I need to extract the zip and use sed to edit the HTML files.

Currently, I have to extract the zip, edit the files, and then zip up again. If I could save the output to a directory (instead of a zip), this would save me the extra step of unzipping.

andrewdbate avatar Oct 13 '21 01:10 andrewdbate

Ok, but this project is called SingleFileZ...

gildas-lormeau avatar Oct 13 '21 20:10 gildas-lormeau

Yes, indeed, but SingleFileZ does support crawling from the CLI, but does not support replacing the URLs in the downloaded files with relative URLs to allow for offline browsing. I would have agreed with you that the suggested feature shouldn't be implemented because it is out-of-scope if SingleFileZ really was just a tool for downloading a single webpage (but fortunately for me you have implemented additional functionality).

andrewdbate avatar Oct 13 '21 20:10 andrewdbate

@andrewdbate Note that the feature you want does exist in SingleFile (cf. --crawl-replace-urls). It could be implemented in SingleFileZ too, it just need some additional work because archives are zip files instead of html files.

gildas-lormeau avatar Oct 13 '21 20:10 gildas-lormeau

@gildas-lormeau Thanks for the tip!

andrewdbate avatar Oct 13 '21 20:10 andrewdbate

@gildas-lormeau This and possibly #119 should be closed now that the option to save as a zip file has been implemented.

God-damnit-all avatar Oct 03 '23 20:10 God-damnit-all

@ImportTaste Actually, self-extracting files or zip files are all (and always have been) compatible with the ZIP specification. I think the OP wants all the resources to be downloaded separately.

gildas-lormeau avatar Oct 03 '23 21:10 gildas-lormeau