How To Publish EPUB to Lulu from Scrivener
Over the past fews days, I've sunk a startling number of hours into publishing my new ebook, Curse of the Healing Kiss, on Lulu. It turned out to be a colossal pain in the ass, and I'm hoping I can point out pitfalls to make your life easier.
Why Publish an Ebook on Lulu?
I wrote the novella in Scrivener, which was great for my writing process, and then decided to compile from Scrivener to EPUB, so I could publish my finished work as an ebook on Lulu. Since I'm using Lulu for the print edition of the book, I wanted to publish the ebook there as well. This gives me access to a free ISBN for the ebook edition, and Lulu handles pushing the published work out to Barnes & Noble, Apple, and Kobo. For Amazon Kindle, I go straight through Kindle Direct Publishing (KDP).
Don't Upload Scrivener's EPUB Output To Lulu
Since Scrivener supports compiling to EPUB, it seemed to me like it would be ideal to take that route. In the compile window, I selected "ePub Ebook (.epub)", and then spent a chunk of time setting up a custom format I was happy with. There are a couple places in my ebook where I want specific formatting and separators, so I couldn't use a vanilla format. The learning curve on this was pretty steep for me, and I have to say, this is my least favorite part of Scrivener. It feels far more complicated to me than it needs to be.
Once I had an EPUB file generated by Scrivener that I was happy with, I uploaded it to Lulu. This is where things really went wrong. The Lulu ebook validator reported errors that seemed completely out-of-sync with the content.opf file in my EPUB, regarding file-as, role, and event attributes. There were some other errors, which I was able to fix -- and I'm not going to bother to describe what I did, because this approach turned out to be an extremely frustrating dead end -- but I eventually had just three errors, which wouldn't go away.
I started a live chat session with a tech-support person at Lulu. She was kind and knowledgeable, and she quickly cut to the chase: Lulu does not support EPUB files generated by any software other than their own converter. When you go to publish an ebook, EPUB is listed as one of the supported formats... but this is just so you can make tweaks to the EPUB file generated by their converter and then re-upload that EPUB.
Instead, Upload Your Word or RTF Doc to Lulu and Let Them Generate the EPUB File
The better approach is to upload your Word or RTF document to Lulu, then download their converted EPUB file and manually edit the files inside that EPUB if you need to make minor changes. This is kind of a disaster, and I hope Scrivener and Lulu can cooperate to come up with a better workflow, but as of December 2019 this is the best way to go.
How Do You Manually Edit an EPUB File?
If you aren't familiar with EPUB files, you're in for a nasty learning curve. The first thing to know is that an EPUB file is just a zip archive. On Windows, you can change the extension of the file to .zip, unzip the file into a directory, and then edit the files in that directory. When you're done, zip the files back up, rename the zip archive to have the .epub extension, and you have yourself an edited EPUB. However, there's one key trick you need to be aware of. In Windows File Explorer, sort the files in the EPUB source-files directory so that the "mimetype" file is at the top of the list, above the "OEBPS" and "META-INF" directories that also appear in an EPUB file generated by Lulu. This way, when you select the "mimetype" file and the two directories, right-click and choose "Send to -> Compressed (zipped) folder", the mimetype file will be the first file in the zip archive. This is a requirement of the EPUB format.
As long as you're making minor changes, manually editing the EPUB file is the way to go. If you make major revisions to your book in Scrivener and want to generate another EPUB file, you'll have to go through the above process all over again.
How Could This Be Better?
It would be great if the folks at Literature & Latte could coordinate with the developers at Lulu to make it so an EPUB generated by Scrivener can be directly uploaded to Lulu. This would make the learning curve so much easier, and would make the workflow far more efficient. Here's hoping this post is made irrelevant in the near future.