Convert webarchive to html

user1785898 picture user1785898 · Nov 20, 2012 · Viewed 15.6k times · Source

I managed to collect the behavior of a complex web site into a webarchive. Thereafter I would like to turn that webarchive into an html set of nested directory. Yet, when I did it both with Waf and with a commercial software bought on the the Apple store, what I get is just the nested directory with the html page at the bottom and no images, nor css nor working links. If you are interested the webarchive document is at:

http://www.miafoto.it/it/GiroMilano.webarchive

while the weak product of the extraction is at:

http://www.miafoto.it/it/Giromilano/Pagine/default.aspx

and the empty directories above. In addition to the different look, the webarchive displays the same behavior as the official web site - when a listbox vales is selected and then the button pushed - while the extracted version produces a page with no contents by loading itself rather than the official page. As you may see the webarchive is over 1MB while the extraction just little over 1 KB.

What is wrong with it and how may I perform such an apparently trivial business with usable results?

Thanks,

Answer

alexkovelsky picture alexkovelsky · May 24, 2015
textutil -convert html example.webarchive
  • Be careful — html with files is created in the same folder as webarchive!
  • Also, I had to open .html with text editor and replace "file:///image.tiff" links (replace "file:///" with "") so they point to relative path.
  • Also, not all browsers display .tiff images.

Who knew we have Stack Overflow wiki?