packages feed

rss-conduit 0.6.0.1 → 0.6.0.2

raw patch · 3 files changed

+13/−19 lines, 3 filesdep ~basedep ~text

Dependency ranges changed: base, text

Files

rss-conduit.cabal view
@@ -1,22 +1,22 @@ cabal-version: 2.2 name: rss-conduit-version: 0.6.0.1+version: 0.6.0.2 build-type: Simple license: CC0-1.0 license-file: LICENSE author: koral maintainer: mail@cmoreau.info-bug-reports: https://github.com/k0ral/rss-conduit/issues+bug-reports: https://codeberg.org/k0ral/rss-conduit/issues synopsis: Streaming parser/renderer for the RSS standard. description: Cf README file. category: XML, Conduit-tested-with: GHC <8.9 && >=8.4.2+tested-with: GHC <=9.10.3 && >=8.4.2 extra-source-files:     README.md  source-repository head     type: git-    location: git://github.com/k0ral/rss-conduit.git+    location: https://codeberg.org/k0ral/rss-conduit.git  flag enable-hlint-test   description: Enable hlint test-suite
src/Text/RSS/Conduit/Render.hs view
@@ -57,7 +57,7 @@     optionalTextTag "generator" $ d^.channelGeneratorL     forM_ (d^.channelDocsL) $ textTag "docs" . renderRssURI     forM_ (d^.channelCloudL) renderRssCloud-    forM_ (d^.channelTtlL) $ textTag "ttl" . tshow+    forM_ (d^.channelTtlL) $ textTag "ttl" . Text.show     forM_ (d^.channelImageL) renderRssImage     optionalTextTag "rating" $ d^.channelRatingL     forM_ (d^.channelTextInputL) renderRssTextInput@@ -89,7 +89,7 @@ renderRssEnclosure :: (Monad m) => RssEnclosure -> ConduitT () Event m () renderRssEnclosure e = tag "enclosure" attributes mempty where   attributes = attr "url" (renderRssURI $ e^.enclosureUrlL)-    <> attr "length" (tshow $ e^.enclosureLengthL)+    <> attr "length" (Text.show $ e^.enclosureLengthL)     <> attr "type" (e^.enclosureTypeL)  -- | Render a @\<guid\>@ element.@@ -115,7 +115,7 @@     x  -> "?" <> x    domain = maybe "" (\a -> renderUserInfo (authorityUserInfo a) <> renderHost (authorityHost a)) $ withRssURI (view authorityL) $ c^.cloudUriL-  port = fmap (pack . show . portNumber) $ authorityPort =<< withRssURI (view authorityL) (c^.cloudUriL)+  port = fmap (Text.show . portNumber) $ authorityPort =<< withRssURI (view authorityL) (c^.cloudUriL)   path = decodeUtf8 $ withRssURI (view pathL) $ c^.cloudUriL   query = renderQuery $ withRssURI (view queryL) $ c^.cloudUriL   fragment = maybe "" decodeUtf8 $ withRssURI (view fragmentL) $ c^.cloudUriL@@ -134,8 +134,8 @@   textTag "url" $ renderRssURI $ i^.imageUriL   textTag "title" $ i^.imageTitleL   textTag "link" $ renderRssURI $ i^.imageLinkL-  forM_ (i^.imageHeightL) $ textTag "height" . tshow-  forM_ (i^.imageWidthL) $ textTag "width" . tshow+  forM_ (i^.imageHeightL) $ textTag "height" . Text.show+  forM_ (i^.imageWidthL) $ textTag "width" . Text.show   optionalTextTag "description" $ i^.imageDescriptionL  -- | Render a @\<textInput\>@ element.@@ -148,17 +148,14 @@  -- | Render a @\<skipDays\>@ element. renderRssSkipDays :: (Monad m) => Set Day -> ConduitT () Event m ()-renderRssSkipDays s = unless (Set.null s) $ tag "skipDays" mempty $ forM_ s $ textTag "day" . tshow+renderRssSkipDays s = unless (Set.null s) $ tag "skipDays" mempty $ forM_ s $ textTag "day" . Text.show  -- | Render a @\<skipHours\>@ element. renderRssSkipHours :: (Monad m) => Set Hour -> ConduitT () Event m ()-renderRssSkipHours s = unless (Set.null s) $ tag "skipHour" mempty $ forM_ s $ textTag "hour" . tshow+renderRssSkipHours s = unless (Set.null s) $ tag "skipHour" mempty $ forM_ s $ textTag "hour" . Text.show   -- {{{ Utils-tshow :: Show a => a -> Text-tshow = pack . show- textTag :: (Monad m) => Name -> Text -> ConduitT () Event m () textTag name = tag name mempty . content 
src/Text/RSS/Extensions/Syndication.hs view
@@ -43,7 +43,7 @@ import           Control.Monad import           Control.Monad.Fix import           Data.Maybe-import           Data.Text+import           Data.Text as Text import           Data.Time.Clock import           Data.Time.LocalTime import           Data.Time.RFC2822@@ -60,9 +60,6 @@ -- }}}  -- {{{ Utils-tshow :: Show a => a -> Text-tshow = pack . show- asDate :: MonadThrow m => Text -> m UTCTime asDate text = maybe (throw $ InvalidTime text) (return . zonedTimeToUTC) $   parseTimeRFC3339 text <|> parseTimeRFC2822 text <|> parseTimeRFC822 text@@ -176,7 +173,7 @@  -- | Render a @\<sy:updateFrequency\>@ element. renderSyndicationFrequency :: Monad m => Int -> ConduitT () Event m ()-renderSyndicationFrequency = renderSyndicationTag "updateFrequency" . tshow+renderSyndicationFrequency = renderSyndicationTag "updateFrequency" . Text.show  -- | Render a @\<sy:updateBase\>@ element. renderSyndicationBase :: Monad m => UTCTime -> ConduitT () Event m ()