packages feed

hpasteit 0.2.3.0 → 0.2.4.0

raw patch · 3 files changed

+17/−8 lines, 3 filesdep +utf8-string

Dependencies added: utf8-string

Files

HPasteIt.hs view
@@ -3,11 +3,13 @@  import ProgOpts (ProgOpts(..), parseOpts) +import Control.Applicative import System.Directory import System.Environment import System.Exit import System.IO +import qualified Data.ByteString.UTF8 as UTF8 import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Lazy.Char8 as LBS @@ -29,16 +31,16 @@     }   = do     paste <- case opt_file of-        "-"  -> BS.getContents-        file -> BS.readFile file+        "-"  -> UTF8.fromString <$> getContents+        file -> UTF8.fromString <$> readFile file      res <- withManager $ \man -> try $ do         rq <- parseUrl "http://hpaste.org/new"         let rq' = urlEncodedBody-                [ ("title"   , BS.pack opt_title   )-                , ("author"  , BS.pack opt_author  )-                , ("language", BS.pack opt_language)-                , ("channel" , BS.pack opt_channel )+                [ ("title"   , UTF8.fromString opt_title   )+                , ("author"  , UTF8.fromString opt_author  )+                , ("language", UTF8.fromString opt_language)+                , ("channel" , UTF8.fromString opt_channel )                 , ("paste"   , paste               )                 , ("email"   , ""                  )                 ] rq
ProgOpts.hs view
@@ -55,7 +55,7 @@ optPasteParser :: Parser ProgOpts optPasteParser = PasteOpts         <$> nullOption (mconcat [ reader  Right-                                , value   "via HPasteIt"+                                , value   "(no title)"                                 , showDefault                                 , short   't'                                 , long    "title"
hpasteit.cabal view
@@ -1,5 +1,5 @@ name:                hpasteit-version:             0.2.3.0+version:             0.2.4.0 synopsis:            A command-line client for hpaste.org license:             BSD3 license-file:        LICENSE@@ -18,6 +18,12 @@   .   Run @hpasteit --help@ for usage information and @hpasteit COMMAND --help@ for   detailed usage information about a particular command.+  .+  Changes in 0.2.4.0+  .+  * made the program unicode-aware+  .+  * changed default title from "via HPasteIt" to "(no title)"  source-repository head   type: git@@ -37,6 +43,7 @@                      , network              ==2.4.*                      , directory            ==1.2.*                      , safe                 ==0.3.*+                     , utf8-string          ==0.3.*    ghc-options:         -Wall