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

Transforms a link to be storable and linkable offline.

Summary

Functions

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

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"