PastePipe-1.5: CLI for pasting to lpaste.net

Safe HaskellNone

Utils.PastePipe

Description

Configuration and communication with lpaste.net

Synopsis

Documentation

data Config Source

Configuration type for PastePipe:

Constructors

Config 

postWithDefaults :: String -> IO URISource

Takes a string to post to the default and returns the URI. Client code is expected to catch any exceptions.

outHandler :: String -> IO ()Source

Define an output handler based on the user-specified verbosity.

defaultUri :: StringSource

The root uri for lpaste.net

saveUri :: String -> URISource

The URI for posting new pastes to lpaste. This isn't guaranteed to trigger a failure on all execution paths, as-is.

buildURI :: String -> String -> URISource

composes the core uri and a string to create a usable URI

post :: Config -> String -> IO URISource

Posts the given content to lpaste.net, returning the new uri.

buildRequest :: Config -> String -> Request StringSource

Creates the request to post a chunk of content.