gildas-lormeau / single-file-cli

CLI tool for saving a faithful copy of a complete web page in a single HTML file (based on SingleFile)
GNU Affero General Public License v3.0
539 stars 57 forks source link

Output extension should be .zip if `--compress-content --self-extracting-archive false` is used #52

Closed Ghost-Terms closed 8 months ago

Ghost-Terms commented 9 months ago

--compress-content --self-extracting-archive false outputs a zip file, but it receives the extension .html rather than .zip

gildas-lormeau commented 9 months ago

Note that you can use the option --filename-template to replace .html with .zip. As a general rule, I'm not a fan of "auto-magical" behavior, but if the need really exists, I'm not against giving it some thought.

Ghost-Terms commented 9 months ago

Note that you can use the option --filename-template to replace .html with .zip. As a general rule, I'm not a fan of "auto-magical" behavior, but if the need really exists, I'm not against giving it some thought.

I mean, I don't think it's "auto-magical" to save a file as the correct extension, but I'm not gonna die on that hill or anything. It's just something I noticed that might be considered undesirable behavior.

gildas-lormeau commented 8 months ago

It's fixed in the latest version via the new template variable {filename-extension}.