Safari offers the .webarchive
format to download a webpage, together with embedded resources (images, etc). As described/linked in answers to How do I turn a Safari Webarchive file into a folder?, there are several apps available to extract the contents of a .webarchive
into a folder containing the individual files. However, all the answers given are GUI apps (except for the textutil
answer, which unfortunately doesn’t do what’s requested, as explained in its comments). However, I would prefer a command-line solution, for easier scriptability etc.
Is there a way to extract the contents of a .webarchive
file from the command line?