Pronounced "crawler" but I shoe-horned my initials in there, how clever.
Requires nokogiri and ruby-graphviz during runtime.
Crawls a single domain without traversing external links and outputs a sitemap showing:
- which static assets each page depends on (imgs, script srcs, and stylesheets)
- the links between pages
Sitemap can be exported as :png, :jpg, :dot or any GraphViz supported format
Build the gem
git clone https://github.com/keithwoody/kwrawler.git
cd kwrawler
rake build && rake install
Add this line to your application's Gemfile:
gem 'kwrawler'
And then execute:
$ bundle
require 'kwrawler'
Kwrawler.crawl( site_url )
or
$ irb
> require 'kwrawler'
> sm = Kwrawler::Sitemap.new
> sm.from_uri( <some domain>, format: :svg, filename: 'custom-sitemap.svg' )
> exit
$ open custom-sitemap.svg
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request