{"id":2483,"date":"2008-11-23T03:20:00","date_gmt":"2008-11-23T08:20:00","guid":{"rendered":""},"modified":"2020-03-27T21:24:42","modified_gmt":"2020-03-28T02:24:42","slug":"things-that-work-bbedit-9","status":"publish","type":"post","link":"https:\/\/henrymelton.net\/2\/2008\/11\/23\/things-that-work-bbedit-9\/","title":{"rendered":"Things that Work:  BBedit 9"},"content":{"rendered":"<p><a onblur=\"try {parent.deselectBloggerImageGracefully();} catch(e) {}\" href=\"http:\/\/1.bp.blogspot.com\/_F_I2jb9dIrA\/SSjej6oHxAI\/AAAAAAAAATk\/AHRvAsbs5JE\/s1600-h\/Picture+3.png\"><img decoding=\"async\" style=\"display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 99px;\" src=\"https:\/\/henrymelton.net\/2\/wp-content\/uploads\/2008\/11\/Picture3.png\" border=\"0\" alt=\"\"id=\"BLOGGER_PHOTO_ID_5271708072451490818\" \/><\/a><\/p>\n<p>This past week, I&#8217;ve been making my published novels available as ebooks.  My experience with <a href=\"http:\/\/itunes.apple.com\/WebObjects\/MZStore.woa\/wa\/viewSoftware?id=288089237&#038;mt=8\">Emperor Dad<\/a> and then <a href=\"http:\/\/itunes.apple.com\/WebObjects\/MZStore.woa\/wa\/viewSoftware?id=294763192&#038;mt=8\">Roswell or Bust<\/a> being out as iPhone App ebooks was encouraging.  I don&#8217;t make much on each sale, but it does put the stories out there where more people can find them.  When I was asked if they were available in other formats, I began the process of converting them to Kindle and Mobi formats.  <\/p>\n<p>Both processes are very similar.  You feed in your novel in one of several formats and it is converted into a dumbed down HTML version.  Then comes the process of editing the HTML so that it displays correctly.<\/p>\n<p>I have to wonder if Kindle was a reengineered mobi format.  But in any case, the readers only handle a subset of HTML, not like the WebKit based version in the iPhone.  Graham Perks did the conversions for the iPhone Apps, and for that I&#8217;m grateful.  It wasn&#8217;t a simple conversion.<\/p>\n<p>When I ran into the problem that the Mobi Creator software wouldn&#8217;t convert my Mac Word document, I experimented and discovered that PDF to HTML conversion of both Mobi Creator and the Kindle web tools was a adequate first pass.    But only a first pass.  I had to convert that code created by dumb automation and fix it.  For that I needed a good HTML editor.<\/p>\n<p>For years, I&#8217;ve been using <a href=\"http:\/\/www.barebones.com\/\">BBEdit<\/a>.  Maybe back to the original version, I don&#8217;t know.  My memory isn&#8217;t that good.  However, I stopped upgrading back at BBEdit 8 because I was using iWeb for my main website and was no longer hand coding the HTML.  But now I needed to do that again.  The upgrade was cheap, and I discovered that version 9 is a nice improvement of an already classic tool.<\/p>\n<p>BBEdit has more options than I&#8217;d ever use, but let me tell you what I did.  <\/p>\n<p>I went to the Kindle page and fed the PDF of my trade paperback novel in.  After a moment&#8217;s crunching, I could preview the resulting code in their on-line Kindle emulator.  It was pretty ugly.  I downloaded the HTML that had been created and unzipped it.  On some of the novels, the auto-conversion had even created a table of contents, but on others it hadn&#8217;t.  I did some minor content editing, like changing the ISBN number for the new ebook version, but it was mostly formatting.<\/p>\n<p><a onblur=\"try {parent.deselectBloggerImageGracefully();} catch(e) {}\" href=\"http:\/\/1.bp.blogspot.com\/_F_I2jb9dIrA\/SSjb5yAD22I\/AAAAAAAAATU\/Q4PMYquy7zs\/s1600-h\/Picture+1.png\"><img decoding=\"async\" style=\"float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 126px;\" src=\"https:\/\/henrymelton.net\/2\/wp-content\/uploads\/2008\/11\/Picture1.png\" border=\"0\" alt=\"\"id=\"BLOGGER_PHOTO_ID_5271705149558217570\" \/><\/a><a onblur=\"try {parent.deselectBloggerImageGracefully();} catch(e) {}\" href=\"http:\/\/1.bp.blogspot.com\/_F_I2jb9dIrA\/SSjb6Gs6aPI\/AAAAAAAAATc\/2PyY0t1YAK4\/s1600-h\/Picture+2.png\"><img decoding=\"async\" style=\"float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 184px; height: 111px;\" src=\"https:\/\/henrymelton.net\/2\/wp-content\/uploads\/2008\/11\/Picture2.png\" border=\"0\" alt=\"\"id=\"BLOGGER_PHOTO_ID_5271705155115051250\" \/><\/a>My paper version (and the iPhone App version) had nice dropcaps at each scene change, but Kindle doesn&#8217;t do that, so I had to do a simpler version with just the font size command.  Interestingly, the automatic conversion changed some of them into a <span style=\"font-weight:bold;\">h3<\/span> block, some into a <span style=\"font-weight:bold;\">h2<\/span> block and still others into a <span style=\"font-weight:bold;\">lettrine<\/span> tag, which I&#8217;d never heard of, not that they actually worked in the ebook version.<\/p>\n<p>The conversion also was rather erratic in its placements of paragraph blocks, sometimes using <span style=\"font-weight:bold;\">p<\/span>&#8216;s and other times using <span style=\"font-weight:bold;\">br<\/span>&#8216;s.  I had to fix that.  Thousands of changes through the novel.  Conversion of styles sometimes came up with strange colors, I don&#8217;t know why.  In all, there were hours of manual changes.  The bulk was done with BBEdit&#8217;s nice grep-capable find and replace, but even then, it had to be eyeballed.  A keystroke gave me a side by side rendered version where I could spot layout problems.  Once that was done, I was able to use the built-in Tidy functions to convert everything to XHTML and scan for errors.  There were thousands of them, and I had to knock them out manually.  This is not a job for a script.  Mangle formatting of a dialog and the reader will never understand the book.<\/p>\n<p><a onblur=\"try {parent.deselectBloggerImageGracefully();} catch(e) {}\" href=\"http:\/\/2.bp.blogspot.com\/_F_I2jb9dIrA\/SSjjIYM2q-I\/AAAAAAAAATs\/4iZXR-Xi26M\/s1600-h\/Picture+4.png\"><img decoding=\"async\" style=\"float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 152px;\" src=\"https:\/\/henrymelton.net\/2\/wp-content\/uploads\/2008\/11\/Picture4.png\" border=\"0\" alt=\"\"id=\"BLOGGER_PHOTO_ID_5271713096911989730\" \/><\/a>Once I finished the <a href=\"http:\/\/www.amazon.com\/gp\/redirect.html?ie=UTF8&#038;location=http:\/\/www.amazon.com\/s?ie=UTF8&#038;x=17&#038;ref%5F=nb%5Fss%5Fb&#038;y=20&#038;field-keywords=%26%2334%3BHenry%20Melton%26%2334%3B&#038;url=node%3D154606011&#038;tag=henrymeltonsc-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=390957\">Kindle formats<\/a> and published the books that way, I fired up my tame Windows version and fed the Kindle HTML into MobiPocket Creator, and relatively easily created the mobi versions and put them up on the <a href=\"http:\/\/www.mobipocket.com\/en\/eBooks\/AuthorDetails.asp?authorId=68332&#038;authorName=Melton,+Henry&#038;Origine=4776\">MobiPocket store<\/a>.<\/p>\n<p>So, now I&#8217;m done. I fed dumbed-down, clean HTML into the ebook publishing programs and I now have my books out there for people who prefer to read on their Palms, cell-phones, etc.  Now to see if there are any sales.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This past week, I&#8217;ve been making my published novels available as ebooks. My experience with Emperor Dad and then Roswell or Bust being out as iPhone App ebooks was encouraging. I don&#8217;t make much on each sale, but it does put the stories out there where more people can find them. When I was asked&hellip; <a class=\"more-link\" href=\"https:\/\/henrymelton.net\/2\/2008\/11\/23\/things-that-work-bbedit-9\/\">Continue reading <span class=\"screen-reader-text\">Things that Work:  BBedit 9<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":2484,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[1],"tags":[112,51,115,299],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/henrymelton.net\/2\/wp-content\/uploads\/2008\/11\/Picture3.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4t90x-E3","_links":{"self":[{"href":"https:\/\/henrymelton.net\/2\/wp-json\/wp\/v2\/posts\/2483"}],"collection":[{"href":"https:\/\/henrymelton.net\/2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/henrymelton.net\/2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/henrymelton.net\/2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/henrymelton.net\/2\/wp-json\/wp\/v2\/comments?post=2483"}],"version-history":[{"count":1,"href":"https:\/\/henrymelton.net\/2\/wp-json\/wp\/v2\/posts\/2483\/revisions"}],"predecessor-version":[{"id":2488,"href":"https:\/\/henrymelton.net\/2\/wp-json\/wp\/v2\/posts\/2483\/revisions\/2488"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/henrymelton.net\/2\/wp-json\/wp\/v2\/media\/2484"}],"wp:attachment":[{"href":"https:\/\/henrymelton.net\/2\/wp-json\/wp\/v2\/media?parent=2483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/henrymelton.net\/2\/wp-json\/wp\/v2\/categories?post=2483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/henrymelton.net\/2\/wp-json\/wp\/v2\/tags?post=2483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}