Jeff Duntemann's Contrapositive Diary Rotating Header Image

June, 2010:

Atlantis and the EPub Toolchain

You’ve heard me say this before, and I suspect you’ll hear it again and again: Creating ebook files is much harder than it needs to be, and creating ebooks in the EPub format is particularly–and inexplicably–hard. In my June 9, 2010 entry, I spoke about the EPub format itself, and how it’s not a great deal different from a word processor file format. In fact, Eric Bowersox pointed out that OpenOffice’s ODF files are also based on XML and organized in a similar way.

Bogglingly, most people appear to be hand-coding EPub XML. In recent days I’ve been looking for better ways to create EPub ebooks. Many places online cite Sigil as the only WYSIWYG EPub editor in existence right now, and I grabbed it immediately. It’s a very nice item, but appears to be an undergraduate’s Google Code project, and I certainly hope he will hand it off to others if he ever gets tired of hammering on it. Version 0.2.1 has just been released, and it fixes a number of bugs that I stumbled over in the last couple of weeks that I’ve been using it.

Then, yesterday, without any need for ancient maps or Edgar Cayce, I found Atlantis.

The Atlantis word processor is a $35 shareware item created by a very small company in France. It’s portable software, meaning it can live on a thumb drive and does not have to be installed in the usual fashion. It’s tiny; nay, microscopic (the executable is 1.1 MB!!) and lightning fast. It doesn’t have all the fancy eye candy of modern software, but it’s amazingly capable, and highly focused on the core mission of getting documents down and formatted. It has a spellchecker and other interesting features like an “over-used words” detector. It reads and writes .doc, .docx, and .odt (ODF) files, and here’s the wild part: It exports to EPub.

Furthermore, it does a mighty good job of it. I loaded a .doc of my story “Whale Meat” into Atlantis and then exported it to EPub. The generated EPub file passed the very fussy EPubCheck validator immediately with flying colors. Now, this was pure text, without any images or embedded fonts or other fanciness, but that’s ok. You have to start somewhere, and I would prefer to start with a genuine word processor.

I then loaded the EPub file that Atlantis had generated into Sigil, which I used to divide the story into chapters and add a cover image. Sigil isn’t really a word processor in the same sense that Atlantis or Word are, but it allows split-screen editing of WYSIWYG text on one side and XML/XHTML code on the other. Sigil 0.2.0 had a bug that generated an incomplete and thus illegal IMG tag (XHTML requires the ALT attribute) but I see that the new 0.2.1 release fixes that. Adding the ALT attribute manually in Sigil 0.2.0 allowed the EPub file to pass EPubcheck without further errors.

I have not yet generated a TOC in Sigil, nor have I attempted to create an EPub of any significant size. (“Whale Meat” is only 8,700 words long.) When I’m through playing around, I’m going to load the entire .doc image of Cold Hands and Other Stories into Atlantis, export it to EPub, semanticize it in Sigil, and see what I have. At some point along the way I may be forced to hand-code (or at least hand-correct) the XML or XHTML, and you’ll hear me bellyache about it when I do. But I will admit that I’m pleased with what I have so far. Yes, Atlantis and Sigil ought to be one product, or at least two closely-knit utilities in the same product family. Still, given the primitive state of the EPub reader business (I have yet to find a Windows or Linux-based EPub reader that I’m willing to use) I’m satisfied with the way that Atlantis and Sigil cooperate. Now that Apple has anointed the EPub format for iBooks, I’m guessing that EPub-related improvements will be arriving thick and fast in coming months.

Review: The Ineo Toaster Dock

IneoDock500Wide.jpg

I have a 320 GB SATA drive that got corrupted when power dropped during a thunderstorm. I lost nothing in terms of data (I do backups well here) but now I have this naked drive in the drawer. I want to go through it and make sure there’s nothing worth taking from it that wasn’t in my backups, and then low-level reformat it and see if it could again be of use.

This is something that most of us do from time to time. I have a small pile of hard drives downstairs on my shelves, pulled from defunct machines before they went to the recycler. A couple of the older ones (1.6 GB anyone?) I treated with one-clunk degunking (in which that single clunk is applied out on one of the flatter boulders behind the house, with a five-pound sledge) but there are some that are still large enough to be useful.

Ordinarily I stick them inside a system to examine and reformat them, but most of the systems in the house are now USFF Dells, and don’t have an “inside” as we define insides. My current Antec desktop tower, as nice as it is in some ways, is miserable to open up. I used to use my old Antec and just left the covers off, but then the mobo died, making it junk. It would be damned fine to have an easy way to connect the occasional drive to a system to work with it, without having to fuss with Metric screws and cables and covers.

IneoDockTopView.jpgOne solution is shown above and (top view) at left: The Ineo I-NA317U+ “toaster” dock. It’s a USB 3.0 device (which works at reduced speed at a USB 2.0 port) with a spring-loaded hatch on the top. You drop a SATA hard drive into the hatch and shove it down until the drive data and power connectors mate with those in the dock. That’s it. The drive then appears as a USB storage device to Windows and Linux without any additional fuss or installing of drivers. The hatch has a notch in the connector corner sized to fit a 2.5″ laptop SATA drive. When you drop in a 2.5″ drive, the hatch doesn’t push down and away, but acts as a positioning guide. The SATA connectors are physically identical irrespective of the size of the drive, and located on the drive end plates so that the dimensions from the corner of the drives are the same on both 3.5″ and 2.5″ drives.

The dock requires a separate wall-wart power supply; there’s not enough power available from a typical USB connector to run both the drive and the dock. (USB 3.0 is more power hungry than 2.0, evidently.) The cable is also different from the conventional USB 2.0 model, and relatively short, at 3′. SATA drives are hot-swappable, and you don’t have to power-down the dock or the system to change drives in the dock. Just do the usual USB unmount, and you can then pull the drive up and out of the dock without damage.

The Ineo device worked flawlessly the first time. It’s SATA only, and I have begun looking for something similar for ordinary parallel ATA drives. I know that ATA drives aren’t hot swappable, so I may be forced to use an ordinary external USB enclosure and just not screw the top back on, but I can live with that. SATA is the future, and as I migrate away from ATA-equipped SX270 USFF machines to SATA-equipped SX280s the Ineo dock will become more and more generally useful.

About $50. (Mine came from Amazon.) Highly recommended.

Cold Hands and Other Stories

CHCoverPrototype.png

I’m sure I’d be a lot more famous if I weren’t so slow, but better late than never: I’m pleased to announce that Cold Hands and Other Stories is now available from Lulu.com in print form, with cover art by the estimable Richard Bartrop. Trade paperback, 230 pp. $11.99.

The body of my short fiction divides pretty much in halves: Stories focused on AI, and stories focused on everything else. I published all of my AI shorts in Souls in Silicon back in 2008. Cold Hands and Other Stories contains everything else, albeit with a new excerpt from my nanotech AI novel, The Cunning Blood. And “everything else” covers a lot of ground: spaceflight, aliens, religion, calculus, witchcraft, and steam locomotives, or at least steam locomotives hacked together from alien parts that probably weren’t intended to go into steam locomotives.

Most of the stories have appeared in print before, and one, “Cold Hands,” was on the final Hugo ballot in 1981. There are a few new ones, including one as new as late last week. Here’s the lineup:

  • “Cold Hands” (from IASFM, June 1980)
  • “Our Lady of the Endless Sky” (from Nova 4, 1974)
  • “Inevitability Sphere” (from IASFM, Sept./Oct. 1978)
  • “Whale Meat” (from Starwind Magazine, August 1977)
  • “Born Again, With Water” appears for the first time.
  • “Drumlin Boiler” (from IASFM, April 2002)
  • “Drumlin Wheel” appears for the first time.
  • “Roddie” appears for the first time.

Rounding it out is another excerpt from The Cunning Blood, different from the one I published in Souls in Silicon, and not available anywhere else but in the novel itself.

A big chunk of the book involves the Drumlins world, which I introduced in 2002 and intend to do a lot more with. Calling it steampunk isn’t quite fair, as it doesn’t take place in Victorian times and corsets are mentioned exactly once. Someone described “Drumlin Boiler” to me as “hillbilly steampunk” (steambilly?) and while that’s a surreal notion, it may be as close as you’ll come.

Yes, an ebook edition is planned, though given the sad, fragmented state of the ebook world right now, it’s going to take some time to kick the file down the tool chain into all the requisite formats. Fortunately, Lulu is a certified aggregator for iBooks, so once I have an EPub that passes the gnarly epubcheck test for standards compliance, I’m going to give it an ISBN and let Lulu list it on iBooks.

As always, blog mentions and reviews are much appreciated!

EPub and Word Processors

Well. Got your heart medicine handy? Jeff is considering a Mac. Well, not exactly. (Put down that nitroglycerine.) I’m strongly considering getting an iPad. And I’ll bet you didn’t know that I already have an iPod, thanks to Jim Strickland, who may in fact persuade me to get a Mac someday. I worry about some of Apple’s cultural issues (like not providing clear guidelines on what you can sell in their stores and what you can’t, and changing your &!$#*% mind about it every other week) but their engineering is extremely good. I spent some quality time with an iPad at a recent Enclave Meetup, and basically, I’m sold. Those guys pretty much nailed the ebook experience, or at very least came up with the best possible compromise between fixed-page and reflowable presentation that anyone might strike. And I want my books out there in the iBooks marketplace.

This means that I need to be able to create EPub files, and good ones. What boggles me is the scarcity of visual tools for that purpose. Among the mainline desktop publishing apps, only InDesign CS4 and CS5 can export finished EPub files, and some people think the feature itself isn’t finished yet. (I don’t have either version so I can’t do my own testing–and at $700 for the app, I don’t expect to get it.) Some odd comments I’ve seen online suggest that the Scribus developers don’t think that reflowable document export is a suitable task for a fixed-layout desktop pubber, and that they’re not going to do it. There are lots of converter programs for taking various types of files and turning them into EPubs. As best I can tell, most people code their EPubs up manually, as though they were writing a C++ program. Gakkh. But also as best I can tell, affordable WYSIWYG EPub editors begin and end with Sigil.

The format itself is not a skullcracker. You’ve got one or more XHTML files expressing content (plus image files, if present), one or more CSS files defining styles, and one or more XML files describing document structure and metadata, all placed in a container file that’s not much more than a .zip with a different extension. There’s an optional DRM layer in the spec, but it’s technology-agnostic and not much used. The spec is simple enough so that people write the damned things by hand. I can’t imagine that parsing and generating the XML/XHTML/CSS would strain any sort of editor.

My point here is that you don’t need a fixed-layout desktop publishing program like InDesign or Quark to create and maintain EPub ebooks. In a sense, EPub is a modern XML-based word processor file spec, and even a middling WYSIWYG word processor could be twisted a little bit to read, render, edit, and write EPub files that could be loaded right into iBooks without further processing.

Sigil comes close. I’m using it and I’m reasonably impressed, considering that the team is basically writing a brand-new word processor from scratch. What boggles me is that it’s the only WYSIWYG EPub editor in the universe. And as a word processor, well, it’s pretty spare.

There’s no reason for this. Existing word processing apps like OpenOffice Writer and AbiWord could easily be extended to import and export EPub files, or forked to create a ramcharged ebook development system using EPub as its primary file format. Fork or not, I’m convinced of this: All word processors will eventually become ebook editors. The ebook market is closing in on reality. We now have the file format we need. The software will follow.

But sheesh guys, how about picking up the pace a little!

The Pack at the Flatirons Kennel Club Show

FlatironsBichonsJune2010.jpg

We spent this past weekend at the Flatirons Kennel Club Dog Show up in Longmont, Colorado, about 100 miles north on I-25 past Denver. It was not a huge show for bichons, and there were only three entered, all males. We entered Jack and Dash, and our new friends Maggy and Steve Lamp entered their 19-month-old Tucker. QBit and Aero were with us, which complicated logistics considerably, but we got a little behind on their vaccination schedules and kennel rules are strict at good kennels. Aero is now a champion, and while he could be entered as a “special,” Carol felt she would be better off putting her effort into whipping Dash’s coat into shape.

She did. Alas, good coat or not, about the best we can say about Dash himself is that he didn’t try to jump up on the judges and lick their noses, as he did at the last Denver show. He has this thing about leashes, and shakes his head while walking to try and get free of them. He also pulls badly when he should be walking around the show ring at a stately prance. “Stately” isn’t in his vocabulary yet. (Aero seemed born to the manner.)

It was a hot day, with humidity shoveled into the barns by ginormous county fairgrounds swamp coolers, and we saw a lot of dog tongues. (Above, left to right: Jack, Carol, Dash, Maggy, and Tucker.) Tucker is a great little dog who is just starting out on the show circuit but still gave Dash a serious run for his money. Dash stayed true to his rowdy nature but evidently his coat carried the day, and when it was over, Dash scored Best in Breed both Saturday and Sunday. (At weekend dog shows, each day is usually a separate competition.)

This may have been due to the small field, and (more likely) the lack of past-champion specials and bitches at the show. Female bichons are a lot less rowdy than males (especially young males) and tend to show better generally. By winning, Dash thus earned four points and made it out of bichon competition entirely. For the first time ever, Carol got to field a dog in the group competition, where the best entrants from each breed in the non-sporting group compete against all the other best-of-breeds. Alas, we got whupped by the same Boston Terrier both days. (Don’t ask me why Boston Terriers aren’t in the Terrier group. Nobody said the dog show business makes sense, least of all Carol or me.)

Still, it was great good fun, and as aerobic as dog shows can get, I managed some quiet time in our hotel room to research ePub tools and get ideas. I’m fleshing out a new novella, Drumlin Circus, and took some good notes. Jim Strickland asked me last week what would happen if somebody drummed up the Big Ball of Plutonium–and I couldn’t answer. It doesn’t take much plutonium to go critical, and I admit I was a little shocked at just how little when Jim looked it up. So there’s plenty of conceptual work still to be done on the Thingmakers, and I’m glad Jim is noodging me to do it. He and I are considering an all-Drumlin Copperwood Double, with two 25,000-35,000 word novellas back to back, in tete-beche format.

The Colorado Springs show is next weekend, and after that it gets quiet for awhile on the dog show front. That’s ok; it’s summer and there’s a lot to do, like hanging an Elfa shelving system along the entire 20-foot rear wall of the garage. There’s software to test and Field Day to work and many words to be written. Snow season is (finally!) over. Time to put my winter coat away and get at it.

Rant: Eat Food. Not Too Much. And Sometimes Plants.

ExtraRich Milk Cap.jpgOh me, oh my, oh me, oh my…I’m just such a bad boy. Last year, I violated the Laws of Thermodynamics by eating more calories…and losing weight. Now, since we all know that every calorie is exactly like every other calorie (settled science!) and since we know that if you take in more calories than you burn, you gain weight, well, what other conclusion can I draw? The Laws of Thermodynamics are wrong! And by next week I’ll have this unbalanced wheel spinning away here! Somebody please wire NIST for me; my FAX machine is broken. They can send the Nobel Prize to my Stanwell St. address.

I’ve had to drill new holes in all my belts. I’m not kidding; you can still see the leather shreds on my 3/16″ bit.

Other weirdnesses are besetting me. My blood pressure is down. It wasn’t all that high to begin with (let’s call it high-normal; Carol doesn’t want me to post precise numbers) and now it’s normal-normal. My blood numbers are good, and haven’t changed a whole lot since I gave up habitual sugar in 1997, at which point they abruptly went from worrisomely high to…low-normal. So how did I do it? What’s the magic method?

Simple. Read this very carefully:

Eat food. Not too much. And sometimes plants.

Or, if you’d prefer the shorter, hipper, periods-for-emphasis version:

Eat. More. Animal. Fat.

I eat an egg fried in butter every morning, and I don’t skimp on the butter. I eat full-fat Greek-style yogurt with breakfast. I eat great mounds of several kinds of cheese. I have everybody-knows-are-hideous things like bratwurst for lunch and sometimes supper, especially in good weather when I can toss them on the grill. I eat steak, ground buffalo, pork roast, and chicken deep-fried in lard, when I can find it. (Alas, the poor lards have been hunted nearly to extinction by cruel activists bearing rapid-fire lawsuits and campaign dollars.)

And most recently, I’ve discovered extra-rich milk. It’s not easy to find, but it’s worth the search. Hereabouts, you can get it in half gallons or gallons at Farm Crest milk stores. Farm Crest milk comes from cows not treated with antibiotics or growth hormone, which is why I started drinking their lower-fat versions to begin with. And it is the whitest, creamiest, most delicious milk I’ve ever tasted. 4.5% milkfat, wow.

So why am I not dead? Am I some kind of alien fluke, or zombie? (If so, I’m coming for your brains, which are deliciously high in fat.) By all the objective measures that we have, I’m healthy and apparently getting healthier. (And most recently, I discovered during a routine eye exam that my vision is getting better. Not so much better as to obviate the need for glasses, but my prescription went down almost half a diopter. No clue why–even I won’t blame it on a low-carb regime–just tossing it on the table.)

That’s the more. Here’s the flipside: I eat a lot less pasta and rice than I used to, love it though I may. I have refined sugar only occasionally, and then only as dessert after a high-fat meal. And little by little, I’m trying to give up refined grains and starches, though that’s a much tougher climb. I do eat vegetables that don’t make me gag or bloat, admitting that it’s a short list. I eat fresh fruit only in moderation, since fruit is mostly sugar. I snack on peanuts or almonds, chased by a glass of extra-rich milk. Once it goes down, I’m not hungry anymore. (Bet I can stop eatin’ em!)

Like a lot of people, I went on the low-fat, high-carb diet recommended by our all-wise, benevolent Federal government in the 70s, and that’s when I started to put on weight. Middle age accelerated the process, and I’d probably be over 200 by now if I hadn’t figured it out.

So let me beat you shamelessly over the head with it, while reminding you that this is one of my clearly labeled and tightly self-rationed rants:

1. Government low-fat dietary guidelines are bullshit, all of them anchored in the bogus work of Right Man Dr. Ancel Keys, who may well be the most damaging fraud in the entire history of science. He had data for 22 countries. He picked the six countries that supported his hypothesis, that fat is bad for you. Then he attacked his critics until the government raised him to sainthood. Over the next thirty years, humanity gained the weight of a minor planet.

2. We know a great deal less about health and nutrition than we think we do, and as with all science, what we know gets old fast. For a quick catch-up, read Gary Taubes‘ book Good Calories, Bad Calories. Breaking news: Human biochemistry is complicated! Story at 11!

3. You may be the fluke, and thrive without effort on a low-fat diet. Maybe we’re all flukes–human beings are not identical. (I love the word “fluke”! I had it printed right on my VOM!) Makes no nevermind: You have the power to find out. You are the experiment. Do the science. I did.

Good luck. Butter is delicious.

Odd Lots

  • I’m not very good at one-liners. So, in my contrarian fashion, I will present an Odd Lots composed entirely of…two-liners.
  • Technical material (textbooks, manuals, computer books) rendered on an ebook reader? Now you’re talking.
  • As someone fond of both astronomy (especially telescopes) and Star Wars, I consider this a wonderful building hack.
  • Harrison Bergeron was evidently a Canadian kid soccer player. (Thanks to Bob Trembley for the link.)
  • What’s your favorite app for extracting text from PDFs? Any experience with ABBYY’s PDF Transformer?
  • And if you’re going the other way, slow but sure pays off: PDFCreator has finally reached version 1.0, after only seven years.
  • Sigil is the only WYSIWIYG editor for EPUB-format ebooks. Why? When will we start editing ebooks and stop coding them?
  • One of my cousins once had a sandbox in an enormous worn-out tractor tire. Now somebody’s recycled such a tire into a bike.