Skip to content

doomspork/sitemappex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sitemappex

Build Status License

A site mapper built in Elixir.

Installation

Add it to your mix.exs:

  {:sitemappex, "~> 0.1", github: "doomspork/sitemappex"}

Usage

To use Sitemappex, there is the map_links/2 function. It takes two arguments, a starting URL and an optional list of whitelisted domains. The result of it is a list of tuples: [{url, occurrences}]

See it in action:

example.com
<html>
  <body>
    <a href="http://www.example.com/blog">Blog</a>
    <a href="http://www.othersite.com">Blog</a>
  </body>
</html>

Assumption: Neither "example.com/blog" or "othersite.com" have additional links.

iex> Sitemappex.map_links("http://example.com")
[{"http://www.example.com/blog", 1}, {"http://www.othersite.com", 1}]

iex> Sitemappex.map_links("http://example.com", ["example.com"])
[{"http://www.example.com/blog", 1}]

Contributing

Feedback, feature requests, and fixes are welcomed and encouraged. Please make appropriate use of Issues and Pull Requests. All code should have accompanying tests.

License

Please see LICENSE for licensing details.

About

Site map generator in Elixir

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages