= Cartographer

http://github.com/erikh/cartographer/

== DESCRIPTION:

Assists in the creation of sitemaps that google, yahoo, etc, use. Has finding,
rewriting, and attribute manipulation before generation. Does not require any
external dependency other than haml.

== FEATURES/PROBLEMS:

* Does not require rails or any web framework.
* Works with static generators.
* Is able to transform a subtree of documents into a proper sitemap.

== SYNOPSIS:

sm = Cartographer.new("http://example.org")
sm.add(Cartographer::URL.new(:location => URI.parse("http://example.org/ethereal")))
sm.add_tree("/some/doc/root") #=> adds all the files in the docroot
puts sm.to_xml #=> outputs your sitemap.

#
# filtering and remapping
#
sm = Cartographer.new("http://example.org")
# pass a block to get the paths found and rewrite them.
# return nil if you want that path (and sub-paths) to be omitted.
sm.add_tree("/some/doc/root") { |x| x.sub(/.html$/, '/') }
File.open('sitemap.xml', 'w') { |f| f << sm.to_xml }

See Cartographer and Cartographer::URL RDoc for more information.

If you need more information about the sitemap format:
http://en.wikipedia.org/wiki/Sitemaps

== REQUIREMENTS:

Users:: haml
Developers:: minitest, hoe-roodi, hoe-git, hoe-reek, nokogiri

== INSTALL:

* gem install cartographer

== DEVELOPERS:

For developers that use rvm, a 'rake install' task has been provided that will
avoid using sudo. You will still need to install the dependencies manually
instead of using 'rake newb'.

For everyone else..

After checking out the source, run:

$ rake newb

This task will install any missing dependencies, run the tests/specs,
and generate the RDoc.

== LICENSE:

(The MIT License)

Copyright (c) 2011 Erik Hollensbe and Zetetic, LLC.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.