Return podcasts
This commit is contained in:
parent
e258eaf123
commit
793e52814b
|
@ -46,20 +46,22 @@ writePodcastTemplate (Right template) (Just podcast) outdir = do
|
||||||
fileName = outdir ++ "/" ++ generatePodcastFileName podcast
|
fileName = outdir ++ "/" ++ generatePodcastFileName podcast
|
||||||
output = title ++ " done!"
|
output = title ++ " done!"
|
||||||
|
|
||||||
single' :: Maybe Audiobook -> String -> String -> IO ()
|
single' :: Maybe Audiobook -> String -> String -> IO (Maybe Podcast)
|
||||||
single' audiobook url outdir = do
|
single' audiobook url outdir = do
|
||||||
day <- utctDay <$> getCurrentTime
|
day <- utctDay <$> getCurrentTime
|
||||||
compiled <- compilePodcastTemplate
|
compiled <- compilePodcastTemplate
|
||||||
|
|
||||||
let podcast = generatePodcast day url <$> audiobook
|
let podcast = generatePodcast day url <$> audiobook
|
||||||
writePodcastTemplate compiled podcast outdir
|
writePodcastTemplate compiled podcast outdir
|
||||||
|
return podcast
|
||||||
|
|
||||||
single :: String -> String -> IO ()
|
single :: String -> String -> IO ()
|
||||||
single url outdir = do
|
single url outdir = do
|
||||||
audiobook <- scrapeAudiobook url
|
audiobook <- scrapeAudiobook url
|
||||||
single' audiobook url outdir
|
single' audiobook url outdir
|
||||||
|
return ()
|
||||||
|
|
||||||
singleWithAuthor :: String -> String -> String -> IO ()
|
singleWithAuthor :: String -> String -> String -> IO (Maybe Podcast )
|
||||||
singleWithAuthor url outdir author = do
|
singleWithAuthor url outdir author = do
|
||||||
audiobook <- scrapeAudiobook url
|
audiobook <- scrapeAudiobook url
|
||||||
let abookDescription = (`toAudiobookWithAuthor` author) <$> audiobook
|
let abookDescription = (`toAudiobookWithAuthor` author) <$> audiobook
|
||||||
|
|
Loading…
Reference in New Issue