Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a no zip option #102

Open
hahaleyile opened this issue Aug 24, 2021 · 11 comments
Open

Add a no zip option #102

hahaleyile opened this issue Aug 24, 2021 · 11 comments

Comments

@hahaleyile
Copy link

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.

@gildas-lormeau
Copy link
Owner

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

@hahaleyile
Copy link
Author

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 😂

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.

@gildas-lormeau gildas-lormeau transferred this issue from gildas-lormeau/SingleFile Aug 27, 2021
@gildas-lormeau
Copy link
Owner

gildas-lormeau commented Aug 27, 2021

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.

@hahaleyile
Copy link
Author

Thank you!

@andrewdbate
Copy link

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.

@gildas-lormeau
Copy link
Owner

Ok, but this project is called SingleFileZ...

@andrewdbate
Copy link

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).

@gildas-lormeau
Copy link
Owner

gildas-lormeau commented Oct 13, 2021

@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.

@andrewdbate
Copy link

@gildas-lormeau Thanks for the tip!

@Ghost-Terms
Copy link

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

@gildas-lormeau
Copy link
Owner

gildas-lormeau commented Oct 3, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants