*** Mirroring ith wget ***

You can mirror a bamboo website with wget. This is useful if
you want to create a static copy of the website in the form
of plain old html files. These html files can then be put
anywhere, such as on your laptop to browse locally.

There are a few tricks to this:

* include the stylesheet *

the style sheet must not be externally linked.
for example, the default decorator does this:

[[
  <?php if (!$robot) { ?>
  <link rel="stylesheet" type="text/css" title="default" href="<?=$root?>/?action=style" />
  <?php } else {
  	echo "<style>";
    include('style.php');
	echo "</style>";
  } ?>
]]

What this does is include the style sheet in every page if
the user agent is a robot (ie wget). It should be possible
for it to work without this, but I have not been successful.

* make the site public *

there must be no access restrictions to view the site. wget
is able to do http-auth, so if the user backend uses
http-auth you may be able to keep the site restricted and
use wget. otherwise, it must be public.

* no images in stylesheet * 

do not specify image paths from the style sheet. wget does
not convert URLs in the stylesheet, so any images specified
there won't get mirror.

* run the command *

[ wget -kmp -nH http://domain.org/site

''
-k   converts the links
-m   mirror
-p   page requisites (ie get images too)
-nH  no host directory
''

* caveats *

- auto linking currently does not work!
  this means any links which are [like this] and don't actually point
  to a real page but get automagically directed to the closes match
  will point back to the original and not the downloaded copy.
  this is a limitation of the wget link converting. we could overcome this
  by pre-calculation where it would redirect to if the user agent is wget.
