2

Using an arbitrary web browser, e.g. firefox, you can save a web page (complete web page), for which it saves the html file, say n.html, and web page elements in a corresponding directory, n_files.

In Win7, if you copy, move, rename either the folder of the html file, they are modified as a single unit. However, Nautilus (the default Gnome file manager), does not do this.

Is there a Nautilus script available to enable this functionality? Is there an alternative way to achieve the same thing?

3 Answers 3

2

I suppose the renaming functionality in Explorer is based on special attributes in the filesystem that Explorer recognises (that's how most of such functionality in explorer works). It would be possible to implement something similar in GNOME / Nautilus (provided you're using a filesystem that supports extended attributes), but AFAIK it doesn't exist currently.

Another possibility would be to write a nautilus plugin that uses some heuristics to detect such html file + corresponding directory and do what you want, but again I don't know of an existing solution (it's also not trivial to implement correctly).


I suggest using the UnMHT addon for Firefox to save the page in one file (maybe there is something similar for other browsers too).

Unlike the Mozilla Archive Format (aka MAF), MHT (aka MHTML) is standardized in an official specification (RFC2557) and it is also supported by IE and other applications, which makes it more future-proof. There are also MHT-viewing plugins for Opera & Safari.

http://www.unmht.org/en_index.html (Firefox extension + viewers for Opera, Safari & QuickLook)

The Firefox addon is also on Mozilla's addon-site.

3
  • Writing a nautilus extensions seems like the right way to go. I've got tens of thousands of pages saved over the years. I tend to reorganise them and delete them in non-deterministic ways (so I can't just use a shell script). I'll write an extension over the weekend and post a link here. Aug 27, 2010 at 11:00
  • Another option might be to convert everything to .mht, not sure if any tools exist for that (or maybe you can script Firefox or xulrunner with that addon installed).
    – JanC
    Aug 27, 2010 at 18:39
  • 2
    Thanks for mentioning that. It turns out that while I was thrashing away at nautilus extensions and shell scripts, the option was there all along in the umht settings: twitpic.com/2k0npt Aug 31, 2010 at 18:20
2

You can download the entire thing using wget.

wget -r --level=0 --convert-links --page-requisites --no-parent http://url.com

-r means it's recursive

--level=0 means it goes down an infinite amount of levels (so http://url.com/pictures/babes/pics.html will be saved, not just the top level page)

--convert-links means it converts the links from <a href="http://url.com/page.html">link</a> to <a href="page.html">link</a>

--page-requisites means it downloads everything that's required to display the page properly. Like images, javascripts, etc.

--no-parent means it doesn't download pages that are "higher up". So if you want http://url.com/graphics/index.html and "below", http://url.com/index.html won't be downloaded.

4
  • 2
    That's a nice answer -- but has nothing to do with the question, right? Aug 10, 2010 at 14:21
  • Seeing as how there's no way to complete the user goal in Nautilus, I posted another way to achieve the same goal. That should be the most important thing, should it not? Aug 10, 2010 at 14:26
  • No because the user in this question has already downloaded the webpages, they're now renaming them in Nautilus.
    – 8128
    Aug 13, 2010 at 6:28
  • 1
    Actually, unfortunately, this isn't even "another way to achieve the same goal". I've got a large archive of saved files and folders and I need to manage them. Aug 27, 2010 at 11:49
0

There's a firefox extension for saving a web page and all it's supporting stuff in a single file: Mozilla Archive Format (with Faithful Save) . I haven't used it personally, but it sounds like what you want.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .