diff --git a/config.dhall b/config.dhall index 82143b9..cbddeb2 100644 --- a/config.dhall +++ b/config.dhall @@ -2,6 +2,7 @@ , postsOutputPath = "posts" , startDate = 1959-01-15 , seed = +2016 +, fileExtension = "md" , adjectives1 = [ "absorbing" , "adorable" diff --git a/generateSealPosts.hs b/generateSealPosts.hs index 605816e..ccd1560 100755 --- a/generateSealPosts.hs +++ b/generateSealPosts.hs @@ -30,6 +30,7 @@ import System.Random (Random (randoms), mkStdGen) data Config = Config { adjectives1 :: [Text] , adjectives2 :: [Text] + , fileExtension :: String , looks :: [Text] , sealImagesPath :: FilePath , postsOutputPath :: FilePath @@ -102,11 +103,12 @@ sealText config n rand date = ( fileName', bp ) show date <> "-" <> "seal-post-" <> show n - <> ".markdown" + <> "." <> fileExtension' date' = T.pack . show $ date title = T.pack $ "Seal Post Number " <> show n title' = T.replace " " "-" title sealImagesPath' = sealImagesPath config + fileExtension' = fileExtension config bp = blogPost' (toGregorian date)