PastePipe-1.8: CLI for pasting to

Copyright(c) Ragon Creswick, 2009-2012 Mateusz Kowalczyk, 2014-2015
Safe HaskellNone



Configuration and communication with



data Config Source

Configuration type for PastePipe:



config :: String -> Config Source

Default config builder

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

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, returning the new uri.

mkPrivatePair :: Config -> (String, String) Source

Make a pair suitable for encoding out of private setting.

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

Creates the request to post a chunk of content.

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

Just print out the fields and the URI that we would have used if we ran with the given Config.