packages feed

linklater 2.0.0.2 → 2.0.0.3

raw patch · 3 files changed

+21/−13 lines, 3 filesdep +hscolourPVP ok

version bump matches the API change (PVP)

Dependencies added: hscolour

API changes (from Hackage documentation)

Files

Network/Linklater.hs view
@@ -11,7 +11,7 @@ -- Here's a @/jpgto@ bot! If you run this program and then tell Slack -- about your server (incoming hook and custom slash command) and then -- type @/jpgto baby corgi@ in one of your channels, you'll get the--- image from @http://baby.corgi.jpg.to@. How, you say? /Screen scraping/.+-- image from <http://baby.corgi.jpg.to>. How, you say? /Screen scraping/. -- -- > -- Remaining imports left as an exercise to the reader. -- > import Network.Linklater (say, slashSimple, Command(..), Config(..), Message(..), Icon(..), Format(..))@@ -36,14 +36,14 @@ -- > main :: IO () -- > main = let port = 3000 in putStrLn ("+ Listening on port " <> show port) >> run port (slashSimple jpgto) ----- One @/jpgto baby corgi@, et voila.+-- One @\/jpgto baby corgi@, et voila. -- -- <<https://raw.githubusercontent.com/hlian/linklater/6232b950a333cfa6d5fffea997ec9ab8c2ce31ba/corgi.jpg>> -- -- For the full example (since this one is missing a ton of imports), -- see the @examples/@ directory on GitHub. ----- https://github.com/hlian/linklater+-- <https://github.com/hlian/linklater>  module Network.Linklater        (
README.md view
@@ -19,15 +19,15 @@  Here's a `/jpgto` bot. If you run this program and then tell Slack about your server (incoming hook and custom slash command) and then-type `/jpgto diplomatico` in one of your channels, you'll get the-image from [http://diplomatico.jpg.to](http://diplomatico.jpg.to). How, you say? _Screen scraping_.+type `/jpgto baby corgi` in one of your channels, you'll get the+image from [http://baby.corgi.jpg.to](baby.corgi.jpg.to). How, you say? _Screen scraping_.  ```haskell -- Remaining imports left as an exercise to the reader. import Network.Linklater (say, slashSimple, Command(..), Config(..), Message(..), Icon(..), Format(..))  findUrl :: Text -> Maybe Text-findUrl = fmap fromStrict . maybeResult . parse (manyTill (notChar '\n') (string "src=\"") *> takeTill (== '"'))+findUrl = fmap fromStrict . maybeResult . parse (manyTill (notChar '\n') (string "src=\"") *> takeTill (== _quotedbl))  jpgto :: Maybe Command -> IO Text jpgto (Just (Command user channel (Just text))) = do@@ -49,7 +49,7 @@ For the full example (since this one is missing a ton of imports), see the `examples/` directory on GitHub. -Now! `/jpgto corgi`:+Now! `/jpgto baby corgi`:  ![jpgtobot in action](corgi.jpg) @@ -57,10 +57,13 @@  ## Features -* Uses `Text` everywhere so you can send your slash commands crazy Unicode characters all day long.-* Lovely documentation.-* Battle-tested.-+  * Uses 'Text' for state-of-the-art Unicode support;+  * Lovely documentation with no misspelllllings to be found;+  * Supports [Slack's formatting syntax](https://api.slack.com/docs/formatting Slack's formatting syntax)+  * Comes with a fast mode (`slashSimple`) and a power mode (`slash`)+  * A warm, receptive maintainer with beautiful brown eyes;+  * Fully Haddock'd methods and module;+  * Open source (BSD3).  ## Contributors 
linklater.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name: linklater-version: 2.0.0.2+version: 2.0.0.3 synopsis: The fast and fun way to write Slack.com bots homepage: https://github.com/hlian/linklater bug-reports: https://github.com/hlian/linklater/issues@@ -26,6 +26,10 @@   .   * Lovely documentation with no misspelllllings to be found;   .+  * Supports <https://api.slack.com/docs/formatting Slack's formatting syntax>+  .+  * Comes with a fast mode (@slashSimple@) and a power mode (@slash@)+  .   * A warm, receptive maintainer with beautiful brown eyes;   .   * Fully Haddock'd methods and module;@@ -68,7 +72,8 @@     text >=1.1.1.3 && <1.2,     containers >=0.5 && <0.6,     wai >=3.0.0.2 && <3.1,-    http-types >=0.8.5 && <0.9+    http-types >=0.8.5 && <0.9,+    hscolour  source-repository head   type: git