Hashemian Blog
Web, Finance, Technology, Running

My EPUB Journey - A Sort of EPUB Primer

by @ 6:00 pm
Filed under: technology,web,writing — Tags: , , ,

With the proliferation of the mobile devices, books have morphed into digital versions and are increasingly viewed in their digital rather then paper formats. To that end there are several popular formats for e- books. PDF, the well-established type from Adobe has been around for many years and still widely used for digital books, but newer formats have begun to supplant PDF as they are more suited to mobile devices. Of those, the most popular is ePub, used by almost all modern e-book readers, except for Amazon Kindle, which uses the KF8 or AZW formats.

With ePub content is optimized and can easily reflow as the user zooms in and out, making for a much smoother reading experience, regardless of the device . In a previous post I mentioned that iUniverse had uploaded my book to Google Books (now part of Google Play) along with its ePub version and how I was able to stop that. In doing so, iUniverse had managed to knock out my own upload from Google Books which I had done long before. I already had the PDF version of my book, so re-uploading that format was a simple task. Generating the ePub version to upload wasn't so simple, specially since I wanted to do that at no cost.

The first order of business was to get an ePub reader on my computer. To that end I followed Google's suggestion of installing Adobe Digital Editions. The product can be used to read eBooks and it has a library feature where one can create a collection of eBooks. Another product, Calibre, does the same and can handle other formats such as PDF and it has other features such as format conversion.

Adobe Digital Editions

Adobe Digital Editions

My first inclination to create the ePub version was to convert the PDF file of the book I already had. One of  the promising methods that I found was an add-on for OpenOffice. After installing OpenOffice and subsequently the add-on, I started the conversion and waited and waited and waited. After a couple of hours the process ended and I had a giant ePub file to contend with. When I tried to view the file in either of the ePub readers it became evident that the conversion result was less then stellar. The text was mangled and jumbled and the ePub was basically useless.

At this point I decided that conversion from PDF is an inexact science and most attempts would  not yield a usable ePub file. Fortunately I still had the original copy of my book as a Word file and figured that would be a much better starting point. What I found incredible was that Word itself has no means of exporting to ePub. Seems unbelievable, but that is the case.

Googling possible options I was back to the freeware product, Calibre. Calibre can be used as a digital library and a reader and it offers some simple conversion tools as well. This article shows how a Word file can be converted to ePub using Calibre. Following the instructions, I was able to tag the book chapters in Word, save the book as html and then make the conversion to ePub in Calibre. Finally I had the ePub version of my book and I confirmed this by loading it in both Calibre and Adobe Digital Editions.

Calibre

Calibre

Time to upload the book to Google Play and be done with this project. Google Play happily accepted the upload and even displayed a progress bar, but in the end it showed no indication that anything was uploaded. I tried multiple times and the result was the same, no indication that I had uploaded anything. What does one do when an app doesn't work, doesn't produce helpful error messages and there's no tech support? Check the help files. Therein was a mention of a product called EPubCheck which one was expected to use against ePub files to validate them before uploading to Google Play.

Seemed like long shot specially since my ePub was working fine with two different viewers, but there was little else I could think of. EPubCheck is written in java and requires JVM to run. Fortunately I already had JVM on my PC so I ran EPubCheck on my ePub file and a flurry of errors and warnings went flying by. How could I have ever been expected to fix all these errors when I didn't even know how to peek inside the ePub file? I ended up downloading a couple of ePub fix and repair utilities but none were able to rid the ePub file of its errors. EPubCheck kept spewing out the same errors over and over.

More online searches led me to a product called Sigil that actually let one open and edit ePub files. Sigil sure delivered. Finally I was able to open the ePub file, locate the errors reported by EPubCheck and fix them. Turns out EPubCheck was just being too picky complaining about some trivial extra fields that Calibre had added based on the original Word file. But apparently Google Play runs EPubCheck against every ePub upload and silently dumps those that don’t pass validation no matter how small the offense.

sigil

Sigil

There was one more revelation here that is noteworthy. While editing the ePub file in Sigil, it occurred to me that the files were in html format. That's when the whole thing started to make sense like an epiphany. The ePub format is actually a collection of html files together with some assets such as image and stylesheet files, zipped and renamed to a .ePub extension. One can open an ePub file by unzipping it and manipulating the files within using the plainest of text editors, like notepad.

One final validation check using EPubCheck and the file was now error-free. I uploaded the file to Google Play, received the indication that the file was received and a few days later, my book was finally available on Google Play in ePub format.

Book on Google Play

Book on Google Play

iUniverse, eBooks, and Copyright

by @ 11:14 am
Filed under: technology,Uncategorized,writing — Tags: , ,

back in June 2012 I received an email from iUniverse regarding my book, Financial Markets For The Rest Of Us. In that email iUniverse, my book's publisher, proudly exclaimed that they have converted my book to the EPUB format and have submitted it to multiple sites. Here's an excerpt:

We are glad to inform you that your book, Financial Markets For The Rest Of Us, has been successfully converted to a new eBook file format. This new eBook version, called EPUB, is quickly becoming the new standard for the eBook industry. iUniverse has submitted the new eBook file to our partner eBook vendors to increase the overall distribution of your book.

iUniverse sure made it sound like they did this to help me, the author, but in reality it was more of a self-serving action to exercise control and maximize profits. Eventually I discovered an even bigger issue to deal with than just their EPUB initiative.

A few months ago I noticed that the book I had uploaded to Google Books had been replaced by the iUniverse's PDF and EPUB versions. This meant that iUniverse was not only earning money from the sale of the paper and digital copies, but also from the Google ads displayed alongside the pages of the book online. I am certain that iUniverse was not sharing any of the ad revenues with the authors. Concerned, I contacted Google to inquire about this and was told that I needed to contact iUniverse and request them to stop their automatic list upload. That meant that iUniverse could circumvent my copyright, effectively preventing me from listing my own book on Google Books.

Eventually I was able persuade iUniverse to stop uploading my book to Google Books and regained control of the situation. It took a few months, but I am now back in charge for both the PDF and EPUB versions on Google Books. Google no longer displays advertising alongside the books' pages, so I must assume iUniverse's willingness to relinquish control was somewhat helped along by that fact.

iUniverse was once a decent company for POD (Print On Demand) publishing. Those were the times when paper books were the only choice and POD services were affordable, but that is no longer the case. iUniverse was acquired by Author Solutions, a company that owns other self-publishing businesses, the POD prices are now exorbitant, service is subpar, sales and marketing pitches are incessant and author payments are questionable according to many sources online. In addition the traditional paper book is no longer the only game in town, being slowly replaced by its digital counterpart, the e-book. E-book publishing is relatively simple nearly eliminating the need for a publishing company, although the publishing outfits won't admit this.

As for my book, while iUniverse continues to be the publisher of the paper version as it was from the beginning, I was finally able to bring the digital versions under my own control, allowing me to make my own decisions, be it to offer the EPUB version for a small fee on Google Books, or just make it available in its entirety on my own web site.

P.S. On my next post I will address how I created the e-book version of my book. It was an interesting journey in the world of digital books.

Hello WordPress, Goodbye Blogger

by @ 10:49 pm
Filed under: web,writing

Blogger recently announced the end of ftp publishing and after 7 years on that platform, I decided to migrate my blog to a self-hosted WordPress platform, and after a few days of tweaking the conversion is finally over.

Yeah I know, the template looks nothing like WordPress. I actually had to "uglify" a classic template to make it flow with the rest of my site. So far, no regrets. Not that I had a choice. With the ftp publishing shutting down, Blogger's only option was to get hosted on Blogspot. I just wasn't prepared to let Blogger pull another trick down the road, so I decided to split. At least Blogger was graceful enough to allow easy API access to the posts. It certainly facilitated the migration.

So long Blogger. It was a good ride while it lasted. But the journey continues on the WordPress train, with this being my first WordPress post.

,,,

Lucid, A Short Story

by @ 8:41 pm
Filed under: writing

After submitting my first short story to Answers.com's Creative Writing Challenge, I hadn't intended to write another one. But then one night, as I was jogging, my mind wandered off and I began formulating another short story incorporating the words from the second writing challenge. I usually contemplate software and programming challenges while pounding the pavement. But one mind-drift led to another and this story almost wrote itself over a few segments of my various routes, including the two cemeteries I often run through near the center of my town.


Lucid

The sun was flooding the room with its blinding rays, but it didn't matter. I was awake already and sitting on a bare floor. "Where am I?", I wondered as I rubbed my eyes. Yet I knew this place well.

It was my room in the house I had grown up in, nestled in a sleepy hamlet just inside the state line. There was a fresh coat of white paint on the walls, the ceiling, and the floor. There were no posters of simians swinging in the Sumatran rainforest on the walls, no bookshelves filled with my spy novels and stories of double-agents infiltrating fifth columns; not even a lamp. I slowly rose to my feet and walked a few steps to the window. The fields down below had a passing resemblance to the Kew Gardens.

Standing in the room where I had spent my salad days, I was reminded of my faithful dog, Lucas, buried out back, who once helped me abscond with my father's pocket knife, and my parents, also long dead now. The reflection quickly turned into sorrow and I felt my eyes welling up, but I quickly turned my attention to the matter at hand, which was to learn how I had ended up there.

The door leading to the hallway was closed. It had the same ghost white paint as the rest of the room. I turned the knob and pulled the door in. It opened with a frightening screech that echoed in the room. Horripilation set in. I froze, listening intently for any signs of life in the house. And then I heard it. Someone was coughing downstairs. The type wheezing cough that sounded so familiar, yet I didn't know why. I was a prowler in a strange house, only this was my house, at least the house of my childhood. It felt like a horrific opus.

Lucid

I passed the bathroom and saw the spiral stairway leading downstairs. Everything was white, even the house door. There was that cough again. I started my descent with my trembling right hand gripping and sliding over the banister. Sunlight was beaming in through the window panes above the house door. As I reached the bottom stair, I turned and squinted at the figure of a woman who appeared to be dusting the bare, whitewashed living room with a feather duster. She abruptly turned. "Oh, Jonathan, you scared me. About time you woke up." She appeared ashen and tired. "I left a bowl of gazpacho for you in the kitchen. Your father's been working outside since the crack of dawn. He could use a hand."

"Hello Mother", I muttered as tritely as a child greeting a parent in the morning and then I realized the gravity of the situation. A fug of dust was billowing out of the room. I couldn't quite see the details of her face but there was no mistaking the voice. Was this woman really my mother? Was this an apparition? Was I dead? I stood there agog at the ghost of the person I had just addressed as "Mother".

My mind was racing. "I'm in a dream. What do they call it? Yes, lucid dream. It's a lucid dream. I always wanted to have one. Now I'm right in the middle of it." I turned quickly towards the door and flung it open. The bright sunlight blinded my eyes, I could feel its warmth on my face. A man in a distance was hollering my name, "Jonathan, Jonathan". A barking dog was racing towards me. I felt my stomach muscles contracting, the way they do just before vomiting. "Lucas," I cried out.

I opened my eyes and tried to swallow, but my throat was dry and throbbing. My fiancée was sitting on the edge of the bed gazing nervously into my eyes. She appeared exhausted. There were bright lights overhead. "Hello Jonathan, how are you feeling?", inquired a middle-aged, bearded man wearing an unbuttoned white overcoat. "We're almost done. I just removed your feeding tube. You might feel a little dizzy or nauseous." He then turned to the attending nurse carting away the apparatus, giving her rapid-fire instructions.

The room was white and reeked with the smell of anti-septic. A heart monitor was blipping rhythmically above my bed. "Oh, Jonathan, you scared me. About time you woke up." I gave my fiancée a grimaced smile in response. "Who's Lucas?"

,,,

Answers.com Creative Writing Challenge

by @ 11:17 pm
Filed under: writing

2nd place in the Answers.com writing challengeI'd almost forgotten about this, but an email notification from answers.com reminded me that I had entered the first-ever answers.com's creative writing challenge a couple of weeks ago.

The rules were simple enough. Take ten words, pre-selected by answers.com, and write a prose, a poem, or an essay in your blog or web page. Hyper-link the words back to answers.com and submit the entry. And so, I decided to post a short story and to enter it in the challenge.

My family liked the story, but of course there's a touch of bias there. Yet surprisingly this past Monday I was chosen by the judges as the runner-up and got a link back to my blog from answers.com's Hall of Fame page, and a $50 Amazon gift certificate to boot.

Of the ten words, the only one I had no idea about was "melissophobia" which means an abnormal fear of bees. That's okay, Word's spell-checker doesn't know that term either. So in the end, the writing challenge was fun, educational, and, considering the $50 gift certificate, profitable.

Answers.com is running another contest now. I may enter again, but better yet, I might ask my kids to take a shot at it. At worst case they will expand their vocabulary and hone their writing skills. Sounds like a win already. Of course, all those backlinks don't hurt answers.com either.

,,

The Greedy Shepherd

by @ 10:28 pm
Filed under: web,writing

Preface: A few days ago I received an email from Answers.com inviting me (and other recipients) to write an essay or a poem using 10 words they had selected and link those words back to them — certainly a publicity and SEO stunt. At the end of the contest they will judge the entries and pick a few winners.

I was going to lambaste the tactic in this blog. Instead, for some inexplicable reason, I decided to take up the challenge and write a short story. I'm not much of a storyteller, although I did write a book about financial markets a few years back, but that's a different matter.

This is my amateurish stab at a short story. I know, I won't quit my day job.


SheepThere was a once a shepherd in Belize who took his herd to a field near his house everyday for grazing. The field wasn't the most fertile but there was sufficient grass for his sheep to graze on. His was a perfunctory task, but for all intents and purposes he made a comfortable living from his sheep. He would occasionally visit the local market and sell a few sheep which made him enough money to buy the necessities of life like food and clothes and, on occasion, a gift for his family, like a yo-yo for his young son. On another occasion he made a quid pro quo deal with the local beekeeper to provide him with honey for a year in return for a sheep.

He had vowed never to change his way of life.

One day, while leading his flock to the meadow, he met a stranger who told him about a field farther away where the landscape was more lush and the grass was ubiquitous and plentiful. The stranger insisted that on this new field the sheep would get fatter much faster and the herd would double or triple in numbers at no time. He kept filling the shepherd's head with quixotic ideas of wealth and status until the shepherd agreed to take his flock to this new field, abrogating the vow he had made to himself.

It was an arduous journey but when he reached the new field, instead of the lush grass he found a barren land with scarcely anything for his herd to feed on. Disappointed and ashamed of his gullibility, he set out to make the return trip home, uncertain if his herd would survive the harrowing trip back. Just then a large colony of wasps that had been disturbed by the herd's arrival stirred into action swarming the shepherd and his sheep and stinging them about their faces. His brand of sheep, known for acute melissophobia, panicked and scattered quickly. Soon they were all out of sight, seemingly lost forever.

The bereft shepherd began the long trek home, alone and destitute with thoughts of regret and penitence circling in his head. Midway to his home, he sat by the side of road to rest his tired and wobbly legs. He failed to notice that his head was just inches away from a large brown recluse spider who had become alarmed by the new visitor. As the spider moved closer to defend her territory with a deadly bite, the shepherd heard a faint bleating and quickly rose in excitement to scan the area. In astonishment he saw his herd, back together, slowly trudging back toward their old grounds. His joy was indescribable as he once again took command of his herd and safely guided every one of them back to their old and trusted turf.

As he watched his sheep with satisfaction grazing safe and sound, he renewed his old vow and never again strayed his flock from the trusted meadow.

Moral of the story:
1) Don't abandon a sure thing chasing after dubious promises.
2) Melissophobic sheep don't make good herds, but …
3) They can save a life.

,,,,,,

Powered by


Read Financial Markets  |   Home  |   Blog  |   Web Tools  |   News  |   Articles  |   FAQ  |   About  |   Contact
Bitcoin: 1K9TzBvQ2oaEb4tX9t2vKDtZouMcpfV6QF
© 2001-2017 Robert Hashemian   Powered by Hashemian.com