Something Calibre does very well is convert ebooks from one format to another. And because of that, I've been able to do something that I simply couldn't have imagined doing just one year ago. I've created a couple of ebooks. From scratch.
I'm not going to be sharing these books, sorry, but I can share how and why I made them.
A few days ago, though, I suddenly realized that with my Kindle and Calibre, I could create ebooks for both the sketches and the troll, and be able to show them off freely, if in plain B&W, to anyone who wanted to see a particular item. It might be a little tricky to make sure I could navigate to the particular picture I wanted, but I have already played around with the ePub format a little, so I thought I'd see if I could do it.
The ePub format, fast becoming a standard for ebooks, is a very simple one. It's basically a set of html files zipped up. That's it. Now, I've been making webpages for over 15 years, so I have a pretty good grasp of basic HTML. Even better, the Torvald site was already set up in such a way that I figured it would be a piece of cake to convert it to an ePub. So I started with that. I removed all the extra formatting from the page, and simplified the layout a little. Then I zipped up the site and imported the zip file into Calibre. Once there, I converted the zip to ePub and took a look at the result.
It was a shambles. The links didn't work, and the layout was completely different. Oops.
I took the ePub that Calibre had created and examined it by saving it to my disk (right click, save to disk) and then changing the extension to zip from epub. It had a handful of extra files in it, and it had removed all my extra picture folders and put everything in the main folder. I went to another epub I'd already dissected and looked at it to see what I was doing differently. It took a little sleuthing, but I discovered that my internal links were using a different convention than the ones used by the working epub. I'd been taught to make a link to a specific place inside a page by making an "a name" tag and putting it around that place. The working epub's HTML files instead used an "id" tag within another tag. So I changed all of Torvald's internal links to id tags instead of name tags, removed a bit more garbage HTML code, and tried again.
This time it worked. I had an epub book with a table of contents that I could click on a name, and be taken to the picture of that person with Torvald. It was awesome. I converted it to mobi format and uploaded it to my Kindle, and it still worked. It's a HUGE file, 25 megs, but it's there on my Kindle so if anyone at Emerald City wants to see some particular person with Torvald, I can click a couple of times and bring up that image.
I divided the collection into eight sketchbooks (three Aquaman ones, an autograph one, one for images not in sketchbooks, a Doctor Who sketchbook, my husband's sketchbook, and my evil twin's sketchbook). Each sketchbook got its own page, and I made the HTML as simple as possible. Just a embedded pictures with id tags so the index could find them. I opened each page in Firefox as I finished to make sure the page were displaying properly.
Then I made two indexes. The first one pointed to each of the sketchbook pages and also to an A to Z index of the artists, which was the second index. I set that one up alphabetically, linking each artist name to the picture by the id tag. It was a bit time-consuming work, but it was to pay off.
Once I was done, I zipped it up and imported the zip file into Calibre, then converted it to ePub. The Table of Contents was a mess. It tried to include part of the A to Z index instead of just the main index.
So I dissected the ePub and copied some of its files over to my original work. There's a toc.ncx file. I edited that one down to just the items I wanted to show in the index. There's a content.opf file. That one just lists all the files in the epub, so I mostly left it alone. I also copied over a META-INF directory and it's sole file as it was, and a mimetype file as it was. Calibre also created a titlepage.xhtml file, and I copied that one over as well, because it's the file that creates the book cover. With the edited toc.ncx file, I zipped up the contents again. This time I renamed the zip file to epub, and imported it into Calibre as an epub file. It worked. Perfectly.
Next job, convert to mobi and upload to my Kindle. And it all worked. I can find an artist name in the A to Z and jump quickly to it.
So I created a couple of books for my Kindle. One from a website, and one from scratch. I'm feeling pretty good about it at the moment, though I'm far from knowing everything. I admit, I can hardly wait to get to Seattle and see my friends and family, and enjoy the convention.
If you happen to be going and want to see my efforts in person, just look for the gal in the Aquaman t-shirt carrying Torvald the Troll in a belt-pack.