feed 0.3.6 → 0.3.7
raw patch · 4 files changed
+17/−8 lines, 4 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
+ Text.Atom.Feed: txtToString :: TextContent -> String
Files
- CHANGES +4/−0
- Text/Atom/Feed.hs +5/−0
- Text/Atom/Feed/Import.hs +3/−3
- feed.cabal +5/−5
+ CHANGES view
@@ -0,0 +1,4 @@+Version 0.3.7:++ * <feed> parsing: made <title> be optional.+ * <entry> parsing: try <published> if <updated> is missing.
Text/Atom/Feed.hs view
@@ -110,6 +110,11 @@ | XHTMLString XML.Element deriving (Show) +txtToString :: TextContent -> String+txtToString (TextString s) = s+txtToString (HTMLString s) = s+txtToString (XHTMLString x) = show x+ data Source = Source { sourceAuthors :: [Person]
Text/Atom/Feed/Import.hs view
@@ -14,7 +14,7 @@ import Data.Maybe (listToMaybe, mapMaybe, isJust) import Data.List (find)-import Control.Monad (guard)+import Control.Monad (guard,mplus) import Text.Atom.Feed import Text.Atom.Feed.Export (atomName, atomThreadName)@@ -61,7 +61,7 @@ do guard (elName e == atomName "feed") let es = children e i <- pLeaf "id" es- t <- pTextContent "title" es+ t <- pTextContent "title" es `mplus` return (TextString "<no-title>") u <- pLeaf "updated" es return Feed { feedId = i@@ -189,7 +189,7 @@ do let es = children e i <- pLeaf "id" es t <- pTextContent "title" es- u <- pLeaf "updated" es+ u <- pLeaf "updated" es `mplus` pLeaf "published" es return Entry { entryId = i , entryTitle = t
feed.cabal view
@@ -1,13 +1,13 @@ Name: feed-Version: 0.3.6+Version: 0.3.7 License: BSD3 License-file: LICENSE Category: Text Synopsis: Interfacing with RSS (v 0.9x, 2.x, 1.0) + Atom feeds. Description: Interfacing with RSS (v 0.9x, 2.x, 1.0) + Atom feeds.-Author: Sigbjorn Finne <sof@galois.com>-Maintainer: Sigbjorn Finne <sof@galois.com>-Extra-Source-Files: tests/Main.hs tests/rss20.xml+Author: Sigbjorn Finne <sof@forkIO.com>+Maintainer: Sigbjorn Finne <sof@forkIO.com>+Extra-Source-Files: tests/Main.hs tests/rss20.xml CHANGES Cabal-version: >= 1.2 build-type: Simple @@ -39,5 +39,5 @@ Text.Feed.Translate Text.Feed.Util Ghc-Options: -Wall- Build-Depends: base, haskell98, xml >= 1.2.6, utf8-string+ Build-Depends: base >= 2 && < 4, haskell98, xml >= 1.2.6, utf8-string