Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
1  
With these requirements in mind, why don't you write a script to do that for you? –  slybloty Mar 17 '14 at 16:19
1  
@slybloty Why the down vote? –  dtmland Mar 17 '14 at 16:24
    
The downvote wasn't me. –  slybloty Mar 17 '14 at 16:25
    
@slybloty Ah, must have been some coward. Didn't leave a comment. –  dtmland Mar 17 '14 at 16:26
    
I could probably come up with a script to accomplish everything expect item 3. I'm not sure how I could accomplish that? Any ideas? –  dtmland Mar 17 '14 at 16:28

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.