PastePipe-1.7: CLI for pasting to lpaste.net

Copyright(c) Ragon Creswick, 2009-2012 Mateusz Kowalczyk, 2014
LicenseGPL-3
Safe HaskellNone
LanguageHaskell98

Utils.PastePipe

Description

Configuration and communication with lpaste.net

Synopsis

Documentation

data Config Source

Configuration type for PastePipe:

Constructors

Config 

postWithDefaults :: String -> IO URI Source

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 :: String Source

The "root" uri for lpaste.net

saveUri :: String -> URI Source

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 -> URI Source

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

post :: Config -> String -> IO URI Source

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

buildRequest :: Config -> String -> Request String Source

Creates the request to post a chunk of content.