packages feed

hakyll-convert 0.3.0.4 → 0.3.0.5

raw patch · 8 files changed

+72/−65 lines, 8 filesdep ~containersdep ~data-defaultdep ~tasty-quickcheckPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: containers, data-default, tasty-quickcheck, xml-conduit

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,22 @@+## 0.3.0.5++### Changed++- Allow bytestring 0.11+- Allow text 2.0 and 2.1+- Allow time 1.11, 1.12, and 1.14+- Allow tasty 1.5+- Allow bytestring 0.12+- Allow filepath 1.5+- Allow containers 0.7++### Fixed++- Some HLint lints+- `-Wx-partial` warning from GHC 9.8+++ ## 0.3.0.4  ### Changed
hakyll-convert.cabal view
@@ -1,13 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack------ hash: f54170dffca0e477d254a3e6d8179cce1bf4c4cb8063e3ea1e7bcef5456fc7c4  name:           hakyll-convert-version:        0.3.0.4+version:        0.3.0.5 synopsis:       Convert from other blog engines to Hakyll. description:    WordPress and Blogger only let one export posts in a limited number of formats, none of which are supported by Hakyll. @hakyll-convert@ is created to bridge this gap, providing a way to turn other platform's datadumps into a set of files Hakyll understands. category:       Tools@@ -79,16 +77,16 @@   ghc-options: -Wall   build-depends:       base >=4.13 && <5-    , bytestring >=0.10 && <0.11-    , containers >=0.6 && <0.7-    , data-default >=0.7 && <0.8-    , directory >=1.3 && <1.4-    , feed >=1.3 && <1.4-    , filepath >=1.4 && <1.5-    , text >=1.2 && <1.3-    , time >=1.9 && <1.10-    , xml-conduit >=1.9 && <1.10-    , xml-types >=0.3 && <0.4+    , bytestring >=0.10 && <0.13+    , containers >=0.6 && <0.8+    , data-default ==0.7.*+    , directory ==1.3.*+    , feed ==1.3.*+    , filepath >=1.4 && <1.6+    , text >=1.2 && <1.3 || >=2.0 && <2.2+    , time >=1.9 && <1.15+    , xml-conduit ==1.9.*+    , xml-types ==0.3.*   default-language: Haskell2010  executable hakyll-convert@@ -100,11 +98,11 @@   ghc-options: -Wall   build-depends:       base >=4.13 && <5-    , cmdargs >=0.10 && <0.11-    , filepath >=1.4 && <1.5+    , cmdargs ==0.10.*+    , filepath >=1.4 && <1.6     , hakyll-convert-    , text >=1.2 && <1.3-    , xml-types >=0.3 && <0.4+    , text >=1.2 && <1.3 || >=2.0 && <2.2+    , xml-types ==0.3.*   default-language: Haskell2010  test-suite golden@@ -121,17 +119,17 @@   ghc-options: -Wall -Wno-orphans   build-depends:       base >=4.13 && <5-    , bytestring >=0.10 && <0.11-    , data-default >=0.7 && <0.8-    , feed >=1.3 && <1.4-    , filepath >=1.4 && <1.5+    , bytestring >=0.10 && <0.13+    , data-default ==0.7.*+    , feed ==1.3.*+    , filepath >=1.4 && <1.6     , hakyll-convert-    , tasty >=1.2 && <1.5-    , tasty-golden >=2.3 && <2.4-    , temporary >=1.3 && <1.4-    , text >=1.2 && <1.3-    , time >=1.9 && <1.10-    , xml-types >=0.3 && <0.4+    , tasty >=1.2 && <1.6+    , tasty-golden ==2.3.*+    , temporary ==1.3.*+    , text >=1.2 && <1.3 || >=2.0 && <2.2+    , time >=1.9 && <1.15+    , xml-types ==0.3.*   default-language: Haskell2010  test-suite spec@@ -149,17 +147,17 @@   ghc-options: -Wall -Wno-orphans   build-depends:       base >=4.13 && <5-    , data-default >=0.7 && <0.8-    , directory >=1.3 && <1.4-    , feed >=1.3 && <1.4-    , filepath >=1.4 && <1.5+    , data-default ==0.7.*+    , directory ==1.3.*+    , feed ==1.3.*+    , filepath >=1.4 && <1.6     , hakyll-convert-    , tasty >=1.2 && <1.5+    , tasty >=1.2 && <1.6     , tasty-expected-failure >=0.12.2 && <0.13-    , tasty-hunit >=0.10 && <0.11-    , tasty-quickcheck >=0.10 && <0.11-    , temporary >=1.3 && <1.4-    , text >=1.2 && <1.3-    , time >=1.9 && <1.10-    , xml-types >=0.3 && <0.4+    , tasty-hunit ==0.10.*+    , tasty-quickcheck ==0.10.*+    , temporary ==1.3.*+    , text >=1.2 && <1.3 || >=2.0 && <2.2+    , time >=1.9 && <1.15+    , xml-types ==0.3.*   default-language: Haskell2010
src/Hakyll/Convert/Blogger.hs view
@@ -4,10 +4,8 @@  module Hakyll.Convert.Blogger (FullPost (..), readPosts, distill) where -import Control.Arrow import Control.Monad-import Data.Function-import Data.List+import qualified Data.Map as M import Data.Maybe import qualified Data.Text as T import Data.Time.Format (defaultTimeLocale, parseTimeM)@@ -125,7 +123,7 @@       _xs -> entryError e (oopsLink ty)     isLink ty l = linkRel l == Just (Right ty) && linkType l == Just "text/html"     oopsSelf = "Was expecting blog posts to have a self link"-    oopsLink ty = T.append "Was expecting entries have at most one link of type " ty+    oopsLink = T.append "Was expecting entries have at most one link of type "  isBloggerCategory :: Category -> Bool isBloggerCategory =@@ -225,12 +223,8 @@ entryError e msg =   error $ (T.unpack msg) ++ " [on entry " ++ (T.unpack (entryId e)) ++ "]\n" ++ show e -buckets :: Ord b => (a -> b) -> [a] -> [(b, [a])]-buckets f =-  map (first head . unzip)-    . groupBy ((==) `on` fst)-    . sortBy (compare `on` fst)-    . map (\x -> (f x, x))+buckets :: (Ord b) => (a -> b) -> [a] -> [(b, [a])]+buckets f = M.toList . M.fromListWith (++) . (map (\x -> (f x, [x])))  -- | Find all non-nested elements which are named `name`, starting with `root`. -- ("Non-nested" means we don't search sub-elements of an element that's named
src/Hakyll/Convert/IO.hs view
@@ -42,6 +42,6 @@       "untitled (" <> T.unwords firstFewWords <> "…)"       where         firstFewWords = T.splitOn "-" . T.pack $ takeFileName postPath-    formatDate = T.pack . formatTime defaultTimeLocale "%FT%TZ" --for hakyll+    formatDate = T.pack . formatTime defaultTimeLocale "%FT%TZ" -- for hakyll     formatTags = T.intercalate ","     formatBody = id
src/Hakyll/Convert/OutputFormat.hs view
@@ -14,9 +14,9 @@ validOutputFormat format   | T.null format = False   | otherwise =-    case formatPath format def of-      Just _ -> True-      Nothing -> False+      case formatPath format def of+        Just _ -> True+        Nothing -> False  formatPath :: T.Text -> DistilledPost -> Maybe T.Text formatPath format post = T.concat <$> helper [] format@@ -58,7 +58,8 @@   T.pack     . dropTrailingSlash     . dropExtensions-    $ chopUri $ T.unpack (dpUri post)+    $ chopUri+    $ T.unpack (dpUri post)   where     dropTrailingSlash = reverse . dropWhile (== '/') . reverse     dropDomain path =@@ -72,7 +73,7 @@       error $         "We've wrongly assumed that blog post URIs start with http:// or https://, but we got: " ++ u -    dropPrefix :: Eq a => [a] -> [a] -> ([a], [a])+    dropPrefix :: (Eq a) => [a] -> [a] -> ([a], [a])     dropPrefix (x : xs) (y : ys) | x == y = dropPrefix xs ys     dropPrefix left right = (left, right) 
src/Hakyll/Convert/Wordpress.hs view
@@ -2,7 +2,6 @@  module Hakyll.Convert.Wordpress (readPosts, distill) where -import Control.Monad import Data.Maybe import qualified Data.Text as T import Data.Time.Format (defaultTimeLocale, parseTimeM, rfc822DateFormat)@@ -70,11 +69,7 @@       Nothing -> fromJust $ parseTime' "Thu, 01 Jan 1970 00:00:00 UTC"       Just d -> d     parseTime' d =-      msum $-        map-          (\f -> parseTimeM True defaultTimeLocale f (T.unpack d))-          [ rfc822DateFormat-          ]+      parseTimeM True defaultTimeLocale rfc822DateFormat (T.unpack d)  -- --------------------------------------------------------------------- -- helpers
test/golden/Golden/GoldenTestHelpers.hs view
@@ -17,7 +17,7 @@   customShow = show  readPostsHelper ::-  CustomShow a =>+  (CustomShow a) =>   (FilePath -> IO (Maybe [a])) ->   String ->   String ->@@ -38,7 +38,7 @@             )     )   where-    spaceToDash = \c -> if c == ' ' then '-' else c+    spaceToDash c = if c == ' ' then '-' else c  readAndDistillHelper ::   (FilePath -> IO (Maybe [a])) ->
test/spec/Spec/Blogger.hs view
@@ -394,9 +394,9 @@             ("1015-02-18T01:04:13Z", fromGregorian 1015 2 18 1 4 13),             ("2020-07-30T15:50:21+0000", fromGregorian 2020 7 30 15 50 21),             ("1015-02-18T01:04:13+0000", fromGregorian 1015 2 18 1 4 13),-            ("1015-02-18T01:04:13+0001", fromGregorian 1015 2 18 1 (4 -1) 13),+            ("1015-02-18T01:04:13+0001", fromGregorian 1015 2 18 1 (4 - 1) 13),             ("1015-02-18T01:04:13-0001", fromGregorian 1015 2 18 1 (4 + 1) 13),-            ("1015-02-18T01:04:13+0100", fromGregorian 1015 2 18 (1 -1) 4 13),+            ("1015-02-18T01:04:13+0100", fromGregorian 1015 2 18 (1 - 1) 4 13),             ("1015-02-18T01:04:13-0100", fromGregorian 1015 2 18 (1 + 1) 4 13)           ]     ]