Saturday, January 11, 2014

I give up!

I'm working on creating a script, or a series of scripts, to take a bunch of markdown files and cover images and create epubs suitable for every online marketplace my employers want to publish on.  It's going very smoothly.  Pandoc is great, and Calibre's ebook-convert isn't so bad itself.  Throw in a little ImageMagick and it's very doable.  I may someday write a big post about my workflow, but right now it's going like this:

The title page is it's own document, with:
%(Book Title)
and that's it.  The Smashwords one will say "Smashwords Edition," but all of the other publishers can use the same title page.  All the other info, like publisher name, date, copyright info, etc is contained in a publisher-specific xml file.  This file is named "(booktitle)(no spaces allowed!).title".

Then I have the promotional copy (blurbs, about the author, whatever) in "(booktitle).about".

The book itself is named "(booktitle).txt" and I keep it separate for reasons of accurate word count as much as anything else.  Some people separate books in chapters but I don't bother with that, especially since I've worked out how to have markdown headers show up in a TOC-style sidebar I can use for navigation.

Finally we have the links document, which are the real reason for so many different epubs.  Being a nice company that wants to help people find things where they normally shop, each epub will have a link to the publishing company's web site, but it will also point to a few other books, a "You might also like" sort of thing, with links back to the marketplace the book was bought at. I know some people do this for Amazon but just have one version for all of the other marketplaces that just link to their own web site.  It's really not that hard to give each site their own links page though, as I just have copy and paste some links and my scripts will do all the heavy lifting.

Okay, this is a fairly cheery and optimistic post so far.  So why the frustrated title?  Because Smashwords.  Because Smashwords is a great site built on a great ideology that was far ahead of it's time. It has some issues though.  It's web site is ugly, and it won't allow two authors to be credited on one book.  But theystill provide a great customer experience, for instance providing all sorts of formats for downloading.  Html, pdf, epub, mobi, more I'm sure.  But in order to make those available, you as the publisher have to send them your book in a Word document.  In 2014, when I'm working in Markdown and pandoc can convert it to every format I could ever want, Smashwords wants an awful, kludgy, closed-source software created Word doc?  I know I can use Libre or Open Office, but they recommend you use Word.  And they have a 177-page (according to FBReader) book, the Smashwords Style Guide, which explains how to format that doc file.

The Style Guide is necessary because a Word doc can get messy if you're not super careful, and even sometimes if you are.  You know what won't get messy like that?  Markdown.  It allows for basic formatting and then you convert it to clean html, or whatever else you want.  Just the same, I've been looking for a way to automatically convert my file to a doc that Smashwords can use, inserting page breaks at the end of chapters and using custom headings, but no dice.  I could format a doc for each book, but it would require a ton of hand-formatting, at least an hour or so per book.

The good news is, I can just submit an epub to Smahwords.  The catch is they won't be able to offer html, pdf, et cetera files unless you submit a Word doc.  So Smashwords users will only have an epub option, because it literally means the difference between five minutes per book and one or more hours per book for me.  The ironic bit is, I could automatically convert to any file type Smashwords provides with a few extra lines on my script, but they only allow uploading epubs.

Oh well.  If we get some serious feedback about this we might work something out, but if someone wants all the formats available we'll also have them on offer through a direct sales service, like Gumroad perhaps.  And I mean all formats available with one purchase.

Til then,


No comments:

Post a Comment