{"id":844,"date":"2014-10-27T13:11:12","date_gmt":"2014-10-27T18:11:12","guid":{"rendered":"http:\/\/ellismorning.com\/blog\/?p=844"},"modified":"2014-10-27T13:14:09","modified_gmt":"2014-10-27T18:14:09","slug":"epubcheck-to-the-rescue","status":"publish","type":"post","link":"https:\/\/ellismorning.com\/blog\/2014\/10\/epubcheck-to-the-rescue\/","title":{"rendered":"EpubCheck To The Rescue!"},"content":{"rendered":"<p style=\"text-align: center;\"><a href=\"https:\/\/ellismorning.com\/blog\/wp-content\/uploads\/2014\/10\/sigil.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-851\" src=\"https:\/\/ellismorning.com\/blog\/wp-content\/uploads\/2014\/10\/sigil.png\" alt=\"sigil\" width=\"800\" height=\"577\" srcset=\"https:\/\/ellismorning.com\/blog\/wp-content\/uploads\/2014\/10\/sigil.png 800w, https:\/\/ellismorning.com\/blog\/wp-content\/uploads\/2014\/10\/sigil-300x216.png 300w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><em><small>SIGIL is a popular tool for generating EPUB files. I&#8217;m still getting the hang of it.<\/small><\/em><\/p>\n<p>&#8220;Hey, I know CSS and HTML. I&#8217;ll make my own ebooks! How hard could it be?&#8221;<\/p>\n<p>Famous last words&#8230; :)<\/p>\n<p>Anyone who creates ebooks from scratch- without using a tool that <em>promises<\/em> to handle it with the push of a button, and doesn&#8217;t let you see what atrocities it&#8217;s <em>actually<\/em> committing- knows it can be a, um, trying process. Usually a multi-day slog that involves a good bit of cursing and\/or breaks away from the computer before your welling frustration vents in irrevocable ways.<\/p>\n<p>Ebook creation is far more finicky than creating a normal document, or even a webpage. There are so many things that must be done to ensure proper positioning and formatting from one ebook-reading device to another, because there&#8217;s no standardization across devices. There&#8217;s also little to no documentation on what each device renders, ignores, or expects to see inside each ebook it opens.<\/p>\n<p>Even when you anticipate every quirk you know about, you might <em>never<\/em> figure out why your title gets split across three pages on the Nook, but looks fine everywhere else.<\/p>\n<p>If you have any web development experience, recall what it was like to build webpages back when you had to account for every web browser&#8217;s interpretation of HTML being wildly different. Ebooks are on the same level- with a healthy dose of crack mixed in.<\/p>\n<p><em>However,<\/em> once you grind through bizarre CSS <a href=\"https:\/\/en.wikipedia.org\/wiki\/Kludge\" target=\"_blank\">kludges<\/a> and generate an EPUB file that displays properly in every device\/program you have on hand, you&#8217;re in the home stretch! EPUB works nearly everywhere- everywhere but Amazon\/Kindle, which uses its proprietary MOBI format instead. But hey, Amazon provides a free command-line tool called KindleGen that converts EPUB to MOBI! Great!<\/p>\n<p>So you try to convert your EPUB&#8230;<\/p>\n<p>&#8230;and the conversion fails&#8230;<\/p>\n<p>&#8230;and KindleGen won&#8217;t explain why, even when you ask for &#8220;verbose&#8221; output.<\/p>\n<p>You Google the error codes it gives you. Hey, if they went to the trouble of defining error codes, surely they&#8217;re documented somewhere!<\/p>\n<p>Nope. You find one whole post on the entire Internet. In Japanese.<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/ellismorning.com\/blog\/wp-content\/uploads\/2014\/10\/kdp_japanese.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-852\" src=\"https:\/\/ellismorning.com\/blog\/wp-content\/uploads\/2014\/10\/kdp_japanese.png\" alt=\"kdp_japanese\" width=\"824\" height=\"555\" srcset=\"https:\/\/ellismorning.com\/blog\/wp-content\/uploads\/2014\/10\/kdp_japanese.png 824w, https:\/\/ellismorning.com\/blog\/wp-content\/uploads\/2014\/10\/kdp_japanese-300x202.png 300w\" sizes=\"auto, (max-width: 824px) 100vw, 824px\" \/><\/a><small><em>Sumimasen! Nihongo o sukoshi dake hanashimasu!<\/em><\/small><\/p>\n<p>I was at this point last week, after hours of fighting with broken hyperlinks and non-centering titles, and quite ready to smash things. Fortunately, I came upon <a href=\"http:\/\/bbebooksthailand.com\/bb-epub-kindlegen-tutorial.html\" target=\"_blank\">this post<\/a> first, which recommended running the EPUB file through a free Java-based utility called <a href=\"https:\/\/github.com\/IDPF\/epubcheck\" target=\"_blank\">EpubCheck<\/a>.<\/p>\n<p><strong>Thank you, EpubCheck!<\/strong> If your EPUB is broken in some fashion, it tells you exactly what&#8217;s wrong in plain English.<\/p>\n<p>In my case, it turns out I&#8217;d forgotten to define some required metadata. The display devices I tested with didn&#8217;t care about the missing metadata, but KindleGen wanted it. (It would&#8217;ve been nice if KindleGen had told me that itself, but oh well.) When I added the metadata to the EPUB, I was able to convert it to MOBI without an issue.<\/p>\n<p>I wanted to call out EpubCheck this week because this is the first time I&#8217;ve ever heard of it, despite a ton of prior effort and research on ebook generation. Anyone who makes EPUB files and wants to be 100% sure they&#8217;re ready for prime-time will want to install and use this tool.<\/p>\n<p><strong>There&#8217;s tons more I can say about ebook generation, but I&#8217;m not sure what might be useful to you guys. I&#8217;m also not sure if you&#8217;re fellow computer nerds, or need extra hand-holding. I&#8217;d be happy to write any how-to you might request, at any tech level. I&#8217;m familiar with creating EPUBs and MOBIs, and very experienced with CSS and HTML in general.<\/strong><\/p>\n<p><strong>If you want help with something, request it in the comments and I&#8217;ll write a post for you!<\/strong><\/p>\n<p><!-- Place this tag in your head or just before your close body tag. --><br \/>\n<script type=\"text\/javascript\" src=\"https:\/\/apis.google.com\/js\/plusone.js\"><\/script><\/p>\n<p><!-- Place this tag where you want the widget to render. --><\/p>\n<div class=\"g-post\" data-href=\"https:\/\/plus.google.com\/106756336697302613382\/posts\/fuEwNV9gXfz\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>SIGIL is a popular tool for generating EPUB files. I&#8217;m still getting the hang of it. &#8220;Hey, I know CSS and HTML. I&#8217;ll make my own ebooks! How hard could it be?&#8221; Famous last words&#8230; :) Anyone who creates ebooks from scratch- without using a tool that promises to handle it with the push of a button, and doesn&#8217;t let you see what atrocities it&#8217;s actually committing- knows it can be a, um, trying process. Usually a multi-day slog that&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/ellismorning.com\/blog\/2014\/10\/epubcheck-to-the-rescue\/\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[2,16,9],"tags":[],"class_list":["post-844","post","type-post","status-publish","format-standard","hentry","category-advice","category-publishing","category-software-tips-and-tricks"],"_links":{"self":[{"href":"https:\/\/ellismorning.com\/blog\/wp-json\/wp\/v2\/posts\/844","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ellismorning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ellismorning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ellismorning.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ellismorning.com\/blog\/wp-json\/wp\/v2\/comments?post=844"}],"version-history":[{"count":12,"href":"https:\/\/ellismorning.com\/blog\/wp-json\/wp\/v2\/posts\/844\/revisions"}],"predecessor-version":[{"id":858,"href":"https:\/\/ellismorning.com\/blog\/wp-json\/wp\/v2\/posts\/844\/revisions\/858"}],"wp:attachment":[{"href":"https:\/\/ellismorning.com\/blog\/wp-json\/wp\/v2\/media?parent=844"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ellismorning.com\/blog\/wp-json\/wp\/v2\/categories?post=844"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ellismorning.com\/blog\/wp-json\/wp\/v2\/tags?post=844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}