Why did i create Static Generator?
Because i wanted a simple way to grab the HTML from a site generated with my Ruby on Rails CMS. The cool thing with StaticGenerator compared to other solutions (wget), is that when i have an URL like /home/subpage , instead of having this file structure:
/home
/subpage.html
i have this file structure:
/home
/subpage
/index.html
so all the links in the generated site will stay the same.
Usage
require 'static_generator'
crawler = StaticGenerator::Crawler.new({
:url=>'http://mysite.com/',
:destination_path => File.('some/destination/directory'),
:url_prefix => 'http://mysite.com/'
})
crawler.crawl!
Author
Julien Desrosiers