1

I have html/webpage files stored in a folder locally on my machine. I can view this content just fine using any browser. However, long term, I would prefer to have the contents stored inside of some kind of archive format (ZIP?). I could do this and manually extract the contents each time I want to view the pages. However, this has several disadvantages.

How I can view html/webpage files inside of an archive file with the following conditions:

  1. Not having to manually extracted the contents each time

  2. The contents should not be extracted into the same directory as the archive - it should go somewhere else like a system temp directory

  3. Not having to extract ALL the contents just to view a few pages. I would like the solution to be able to only extract the contents necessary to render the current page being viewed

dtmland
  • 2,933

1 Answers1

3

The one way, that I can think of, to accomplish your requirements would be to write a script that does this. When you want to see a page from the archive, open it with the script.

This way, you can have the script do the following:

  • create a temporary folder
  • read the HTML file
  • grab all the links needed
  • go through them and grab the rest of links, if any
  • create the structure from the archive
  • extract the needed files (from links) into the newly created structure
  • display the page
  • remove the temp folder upon closing the page

I know it involves a little bit of work, but, depending on the usage and necessity it might be worth it.

slybloty
  • 515