Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert webarchive to html

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,

like image 841
user1785898 Avatar asked Nov 20 '12 09:11

user1785898


1 Answers

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?

like image 90
alexkovelsky Avatar answered Sep 22 '22 12:09

alexkovelsky