Webrexp-1.0: Regexp-like engine to scrap web data

Webrexp.ResourcePath

Description

Module implementing plumbing to get a unified path locator, handling URI & local path. Implement the GraphPath and GraphWalker typeclass with HxtNode

Synopsis

Documentation

data ResourcePath Source

Main data type

Constructors

Local FilePath

Represent a file stored on the hard-drive of this machine.

Remote URI

Represent a ressource spread on internet.

Instances

Eq ResourcePath 
Show ResourcePath 
GraphPath ResourcePath 
GraphWalker DirectoryNode ResourcePath 
GraphWalker JsonNode ResourcePath 
GraphWalker HaXmLNode ResourcePath 
PartialGraph DirectoryNode ResourcePath

The problem of this instance is the fact that it's a sink instance, it accepts everything.

PartialGraph JsonNode ResourcePath 
PartialGraph HaXmLNode ResourcePath 
(PartialGraph a ResourcePath, PartialGraph b ResourcePath) => GraphWalker (UnionNode a b) ResourcePath 

rezPathToString :: ResourcePath -> StringSource

Given a ressource, transforme it to a string representation. This function should be used instead of the Show instance, which is aimed at debugging only.

downloadBinary :: (Monad m, MonadIO m) => Loggers -> URI -> m (URI, Response ByteString)Source

Helper function to grab a resource on internet and returning it's binary representation, and it's real place if any.