You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hak...@googlegroups.com
Hi,
I'm trying to compile an epub version of every posts in addition to the html one. I know that pandoc can generate an epub, so it should be possible
I looked at the tutorial to have a different version of a post, but it only says how to distinguish the two versions. But it also talks about `pandocCompilerWith'. It may be the function that I should use, but I don't understand how. I think that I should do something with defaultHakyllWriterOptions and the WriterOptions type to specify the output format. Haskell is not my main language.
Could you give me examples to do that? Or maybe examples to generate an pdf version. I can try to adapt it after.
Thanks
Louis
Jasper Van der Jeugt
unread,
Jul 15, 2013, 10:11:15 AM7/15/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hakyll
Hello,
I have been travelling a lot for the past few days and will continue
to do so for another week or two. My apologies for the late reply.
In order to do this, you want to use `readPandoc` [1]. This converts
the markdown to the internal format used by Pandoc. You can then use
the Pandoc API [2] to convert this to the EPUB format.
I think the result would look like e.g.,:
compile $ do
body <- getResourceBody
withItemBody
(\p -> unsafeCompiler $ writeEPUB defaultHakyllWriterOptions p)
(readPandoc body)
> --
> You received this message because you are subscribed to the Google Groups "hakyll" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
ma...@louisroche.net
unread,
Jul 29, 2013, 5:11:26 PM7/29/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hak...@googlegroups.com
Hi,
Thanks for your answer. I was very busy, I'm sorry for not responding faster.
I tried your solution and it compiles. Big improvement. But the epub file contains no text. It's a valid epub file, but without the text of my post.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hakyll
Hey Louis,
I tried your code and encountered the same problem: I'm not sure how
`writeEPUB` works. Did you figure this out in the meanwhile? I can
invest some time to solve this issue later.
Peace,
Jasper
ma...@louisroche.net
unread,
Aug 19, 2013, 7:40:43 PM8/19/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hak...@googlegroups.com
Hi,
writeEPUB needs a template to generate the epub. If the writerTemplate in the writerOptions is empty, the epub will be empty.
With this code, I have the content of the blog post in the epub. I just need to add the post title and the author name.