Crawler.Linker.PathOffliner (Crawler v1.1.2) View Source

Transforms a link to be storable and linkable offline.

Link to this section Summary

Functions

Transforms a given link so that it can be stored and linked to by other pages.

Link to this section Functions

Transforms a given link so that it can be stored and linked to by other pages.

When a page does not have a file extension (e.g. html) it is treated as the index page for a directory, therefore index.html is appended to the link.

Examples

iex> PathOffliner.transform("http://hello.world")
"http://hello.world/index.html"

iex> PathOffliner.transform("hello.world")
"hello.world/index.html"

iex> PathOffliner.transform("hello.world/")
"hello.world/index.html"

iex> PathOffliner.transform("hello/world")
"hello/world/index.html"

iex> PathOffliner.transform("hello/world.html")
"hello/world.html"