Closed RamiroPastor closed 3 years ago
Ok, found the solution by using the commit
function from the package itself. However, I'm getting now another error because of an extra field of length 20 in the mimetype file. Depressing.
main :: IO ()
main = do
mimetype <- mkEntrySelector "mimetype"
createArchive "conmocion.epub" $ do
addEntry Store "application/epub+zip" mimetype
commit
packDirRecur Deflate (mkEntrySelector . ("META-INF/" ++)) "./ePub/META-INF"
packDirRecur Deflate (mkEntrySelector . ("es/" ++) ) "./ePub/es"
packDirRecur Deflate (mkEntrySelector . ("assets/" ++) ) "./ePub/assets"
Does it say the name of the field?
No, and also when I run this test function:
test :: IO ()
test = do
mimetype <- mkEntrySelector "mimetype"
withArchive "conmocion.epub" $ do
mDesc <- getEntryDesc mimetype
liftIO $ putStrLn $ show $ edExtraField $ fromJust mDesc
The console output is:
ghci> test
fromList [(1,"")]
I will take a look, latest this weekend.
That would be great, thanks.
Can you try out #82 and see if it fixes the issue for you?
Works !!
Validación usando la versión de reglas epub 3.2.
No se han detectado errores o advertencias.
Mensajes: 0 errores fatales / 0 errores / 0 advertencias / 0 indicaciones
EPUBCheck completado
That means: 0 errors 👍
Okay, I'll fix the failing test and release 1.7.2 but probably not today. Latest on Monday.
Done, 1.7.2 is on Hackage.
Hi, I've started using this package to create a
.epub
file and I must say it has been much smoother than the javascript library I tried previously (epub-zipper)However, there is one small detail I cannot solve: the EPUB 3.2 specification states that
And that it must not be compressed. I have achieved the "non-compressed" condition, but i don't know how to fulfill the "first file in the zip archive" condition. This is my code:
And I get the following error in the epub online validator
Any idea on how to put the mimetype file as the first file in the archive?