EpubCheck To The Rescue!

sigilSIGIL is a popular tool for generating EPUB files. I’m still getting the hang of it.

“Hey, I know CSS and HTML. I’ll make my own ebooks! How hard could it be?”

Famous last words… :)

Anyone who creates ebooks from scratch- without using a tool that promises to handle it with the push of a button, and doesn’t let you see what atrocities it’s actually 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.

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’s no standardization across devices. There’s also little to no documentation on what each device renders, ignores, or expects to see inside each ebook it opens.

Even when you anticipate every quirk you know about, you might never figure out why your title gets split across three pages on the Nook, but looks fine everywhere else.

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’s interpretation of HTML being wildly different. Ebooks are on the same level- with a healthy dose of crack mixed in.

However, once you grind through bizarre CSS kludges and generate an EPUB file that displays properly in every device/program you have on hand, you’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!

So you try to convert your EPUB…

…and the conversion fails…

…and KindleGen won’t explain why, even when you ask for “verbose” output.

You Google the error codes it gives you. Hey, if they went to the trouble of defining error codes, surely they’re documented somewhere!

Nope. You find one whole post on the entire Internet. In Japanese.

kdp_japaneseSumimasen! Nihongo o sukoshi dake hanashimasu!

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 this post first, which recommended running the EPUB file through a free Java-based utility called EpubCheck.

Thank you, EpubCheck! If your EPUB is broken in some fashion, it tells you exactly what’s wrong in plain English.

In my case, it turns out I’d forgotten to define some required metadata. The display devices I tested with didn’t care about the missing metadata, but KindleGen wanted it. (It would’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.

I wanted to call out EpubCheck this week because this is the first time I’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’re ready for prime-time will want to install and use this tool.

There’s tons more I can say about ebook generation, but I’m not sure what might be useful to you guys. I’m also not sure if you’re fellow computer nerds, or need extra hand-holding. I’d be happy to write any how-to you might request, at any tech level. I’m familiar with creating EPUBs and MOBIs, and very experienced with CSS and HTML in general.

If you want help with something, request it in the comments and I’ll write a post for you!


Find Something To Automate This Week

robotLet’s see if this little guy is up for some vacuuming…

If you have a WordPress blog, or frequent the comments section of any high-traffic site, chances are you know all about comment spam. This blog doesn’t get much traffic, but boy, spammers love it. At one point, I was getting upwards of 30 spam comments daily- comments I’d clear from my WordPress dashboard and from my email several times a day.

What a waste of time! But I embraced that chore, and stuck with it for weeks.

Why? Because it was there.

Here are things human beings are good at:

  • developing good habits
  • developing bad habits
  • inventing chores for ourselves
  • despairing we don’t have time for everything we want to do

Think about the latter two. Have you ever taken on tasks you didn’t have to? There may be chores you can reduce in frequency or eliminate outright. If you can, do so.

For the stuff that has to be done: could it be set on automatic?

My tedious spam deletion, for instance. Did I really have to delete all of those messages, several times a day? Heck no- there are plenty of WordPress plugins for filtering spam. I installed one that’s been working great so far. No more garbage comments cluttering up my inbox, and a few extra minutes added to my day!

What one chore might you be able to automate this week, thus freeing up a little more time to focus on stuff that matters to you?

For instance: do you have automatic payment set up for every utility/bill that supports it? That saves you a ton of stamps and check-writing.

Do your appliances have any timers, schedulers, or other automation features you’re not taking advantage of? Is there an affordable upgrade or technology out there that would eliminate a hated chore? I’m not quite sold on a Roomba-like device yet, but I’m keeping an eye on them because vacuuming is easily my least favorite bit of housework.

Email can be a giant pit of time-wasting, too. Good inbox filtering and automated responses can act as the secretary or bouncer you wish you had. Set up folders, and rules to route emails to those folders. Then- if you have the discipline– choose one time period per day when you’ll focus on email. For the rest of the day, close email and disable notifications.

If you have money to spare, but not time, you can hire help: a housekeeper, a babysitter, maybe even a remote executive assistant who’ll handle pretty much anything you want them to. Some people swear by Brickwork and the like! As a frugal hands-on writer type, that’s too extreme for my tastes, but it’s an interesting idea.

Identify one thing to automate away this week. If it works out, challenge yourself to come up with more time-saving tricks!

What are you so glad you don’t have to do anymore, thanks to automation? Let me know in the comments!


Work on Discipline, Not Motivation

runRun! Run like zombies are chasing you! Hey, there’s an app for that

Most of my mornings start the same way: alarm blaring, cat pawing at my hair. I crawl out of bed (eventually), have breakfast and coffee, and post a new “Today I learned” factoid to my Google+ page. Then, unless I’m sick enough to be bedridden, I sit down in my office and write until lunch, with occasional breaks to stretch and read items of interest.

What I work on changes: blog posts, articles, story drafting or rewrites. It’s usually dictated by deadlines, and only occasionally by what I “feel like.” In fact, before sitting down in front of my laptop, I sometimes feel nothing but reluctance. My brain is foggy, and I could do with another hour or two of sleep free of feline harassment.

Still, I dig in. It may be torturous at first, every word looking and sounding like crap- but often, just a few minutes of that slog propels me into a zone where forming sentences isn’t as hard. Habit kicks in and pushes words out. When I’m really “on,” hours fly by without any awareness of their passing.

Every time I power through reluctance, I’m strengthening my discipline. It always comes back and saves my butt whenever I feel like I can’t.

When you’re serious about doing something- even if it’s something you love- motivation won’t always be there. You can’t schedule it, so don’t bother. Build up your discipline instead by following the mantra of Just fucking do it. Set aside some time every day, week, whatever, and treat it as you would treat any other important commitment. Don’t make excuses for yourself. Remember that the human brain is a master of rationalizing, and will come up with perfectly good reasons why you shouldn’t do this or that, if you let it.

Start small and move up, if you like. No need to run marathons on day one. Take a jog around the neighborhood, then the park, then the city. You know what fuels motivation? Progress– and discipline will get you progress!

Every time you complete a scheduled session, reward yourself with something small, something that won’t sabotage your hard work (no candy bars after workouts!). This positive reinforcement will help lock in the habit.

Sure, sometimes you power through your unwillingness to write, exercise, etc. and still feel miserable by the end. There are always bad days. They shouldn’t be the norm, though. If bad days keep stacking up, ask yourself why. Is this something you don’t value as much as you think you did? Could you be doing it differently?

What’s funny to me is how one can know all this stuff, and be super-disciplined with some things, and yet not be disciplined at all with others. I’m good with exercise and writing, but languages, crafts, drawing- I’ve struggled to restart since leaving my full-time job. I treat writing as “work,” and I see other interests as “not work.” Shouldn’t I give myself a break and do those things when I feel like it?

There’s nothing wrong with that- but doing things that way means your skill will plateau. You’ll maintain- maybe even lose- and won’t ever gain. If you’re OK with that, fine. If you want to improve, though, there’s no way around discipline.

This isn’t about making every day a strict training regimen. It’s not about being super-intense about every activity you take part in, either. It’s about deciding what matters to you, and not waiting for something as fickle as motivation to give you permission to chase it.

What are you really disciplined with, and not so disciplined with? Let’s trade notes in the comments!


Things I Wish Everyone Knew About Epilepsy

lightbulbsIf normal people get one lightbulb over their heads, I get three. Then my brain overloads.

My last full seizure occurred back in 2012. I woke up strapped to a gurney and wearing an oxygen mask. A pair of EMTs wheeled me out of a place that kind of looked like work.

Oh. Did I have a seizure at work? I wondered. Where do I work? What day is this? All the usual confusion flooded in along with nausea and a splitting headache.

The techs packed me up in an ambulance. On the ride to the hospital, they asked the usual questions to assess where my brain was in its rebooting process. Name? Address?

After each question followed a long pause that I struggled to fill. My brain tried to connect to that information, but couldn’t. This time, it was just frustrating. On past occasions, I’d broken down crying.

No big deal, they told me. It’ll come back soon. They had my wallet and purse, which a coworker had grabbed from my desk.

I remained calm in that ignorance-is-bliss sort of way. The EMTs told me which hospital I was at, wheeled me into the ER, put me on a bed, gave me an IV, and said my husband was on his way.

More and more memory came back as I recovered. I had gone to work that day alone; my husband, who’d worked at the same company, had been working from home. I’d been sitting at my desk when I’d started not feeling well, that familiar dizziness and nausea. Through the fog, I’d realized I needed a break, and feared throwing up at my desk. That was probably why I’d gone to the bathroom and locked myself in a stall.

Then the seizure hit. I fell and banged my head off of something, and wound up crumpled in the bottom of the stall with an inch-long gash in my forehead. Sometime later, someone found me in the bathroom and called for the ambulance.

I was told that blood had gotten everywhere. I believe it; head wounds like to bleed. I even found dried blood pooled in my ID badge holder, which I wore on my hip. The ER doctor who stitched up the wound had this weird glee in this voice when he told me, “That’s gonna leave a scar!”

I had only started working at this place a month before, and was mortified this had happened in front of people I barely knew. I also felt really bad for whoever cleaned up the mess.

It wasn’t fun, but I’m thrilled to say that I haven’t had a full seizure since.

I started having seizures at the ripe old age of 24. It took me six years to find a good neurologist and effective treatment, and as it turns out, I’m one of the lucky ones. Here are a few things I didn’t know about epilepsy until I was staring it in the face:

The doctors don’t know. The brain is still a mystery. The first time you have a seizure, you’re rushed to the hospital and given a CT scan. That scan might show a tumor or brain deformation. Or, as in my case, it might be perfectly normal. So you go for an MRI next. Normal. EEG? Also normal** (but hey, you make a great Borg Queen with all those electrodes on your head).

At this point, your doctors throw up their hands. One seizure could be anything. You may not ever have one again.

Whoops—but I did! And still my brain looked fine. Idiopathic epilepsy it is! “Idiopathic” being the fancy doctor word for “We don’t have a goddamn clue what’s causing it.”

You look to your doctor for reassurance and answers—especially when you’ve been healthy your whole life, you’re scared, and you don’t know what the hell is going on. Unfortunately, medical science just hasn’t figured out why most seizure disorders occur. It’s a tough thing to have to accept.

It’s different for everyone. The problem with nailing down epilepsy and other neurological issues is that no two people suffer identical forms. Abnormal electrical activity can affect many different regions of the brain, to different degrees, leading to all sorts of weird problems.

Some epileptics have the violent, thrashing seizures most people are familiar with, but not all do. Some epileptics just stare off into space. Some lose bowel or bladder control. Some have orgasms. And did you know hiccuping might be a form of seizure? (There’s no consensus on this.)

I’ve been told my seizures look scary, but they sound pretty uneventful as such things go. I tense every muscle in my body, and stop breathing long enough for my lips and hands to turn blue. I’m unaware of it because I’m unconscious at that point. It’s like sleeping in on Saturday, or all those billions of years before I ever existed. I couldn’t care less until I wake up. Then I get treated to a headache, nausea, amnesia—and often, a crushing sense of guilt. Sometimes I’ll cry and apologize to everyone around me.

A person’s epilepsy also may or may not have a trigger. Strobe light patterns may trigger a seizure in some epileptics, but not others. I’m not photosensitive, but stress does seem to make my seizure activity worse. As does my menstrual cycle—a poorly understood phenomenon called catamenial epilepsy.

Frequency is also variable. Some people’s brains have epileptic activity all day long. Others may go months or years without a seizure.

It might come with spider-sense. Some epileptics, like me, have a  set of symptoms that proclaim BEND OVER, A SEIZURE IS HERE. This is called an aura, or partial seizure. My symptoms involve feeling spaced out while my thoughts spin out of control, referred to as forced thinking. (I can never remember what I was thinking about afterward.) Then I feel nauseated, sometimes full of dread. Sometimes I get a sense of déjà vu as well, just to change things up. I also stop being able to spell or string words together in a sentence.

I can never control whether I’m with-it enough to lie down somewhere or tell someone what’s going on. In the latter case especially, I often can’t push words out of my mouth. Sometimes I wave my hands in distress. Sometimes I run to the nearest bathroom, convinced I’m about to throw up (I never do). Sometimes a full seizure follows, and sometimes it doesn’t. An aura by itself is not uncommon. Afterward, I might feel anywhere from “Well, that was annoying. Who’s up for coffee?” to “I’m going to bed, wake me up next month.”

No one knows how the medication works, or if it’ll work for you. That is not an exaggeration. You know what seizure medication is? “Hey, we gave this pill to sufferers of Disease X. The Disease X patients who also have epilepsy stopped having seizures while on this pill. This pill is now an epilepsy drug!”

You probably don’t have Disease X. You probably don’t need treatment for Disease X, or any of the horrible side effects that come with it. Too bad! There is no medication specifically targeted to treat epilepsy. There’s just a huge swath of these “Disease X and also seizures” meds that you get to Russian roulette your way through until you find one—or a combination—that stop your seizures without killing you.

Again, not an exaggeration. The first medicine I tried made me suicidal. The second gave me a serious allergic reaction. I was damn lucky to wind up unscathed on Pill #3, but this one has a reputation for a wee bit of severe liver damage. I have to get my blood tested twice a year to make sure my liver isn’t, you know, disintegrating.

But, no more full seizures. It’s a trade-off you learn to accept, unless you want to be found in a bathroom stall covered in your own blood.

pillsOh- and never miss your dose. That in itself can trigger a seizure.

Some people never find a drug that works for them. Depending on how badly epilepsy affects them, surgery might be the next option. It’s no more complicated than cutting away the part of brain in which the seizures occur. Yay?

There are odd things you can’t do anymore. If you don’t have an aura, you’re often prohibited from driving. You’re not allowed to skydive (fine, I never wanted to!). You may or may not be able to donate blood anymore—not just because of the medication in your blood, but also because those medicine levels drop when you give blood, which itself can result in a seizure.

Due to the medicine(s) you’re on, you may have other weird prohibitions. I can’t eat grapefruit or starfruit, for instance. Also, alcohol has a completely random effect: either it doesn’t touch me at all, or it puts me right to sleep.

Being on chronic medication means you always have to worry about how much medicine you have on hand, and when to harass your neurologists for prescription refills. A bad neurologist might never return your calls. Then you run out of meds, have a seizure, and back to the ER you go! (Yes, this happened to me. A good neurologist is hard to find, but invaluable.) When you travel, you must remember to pack your pills and a note from your neuro. Yes, Mr. TSA Agent, I’m allowed to have these. Really, who’d be taking this stuff for fun?

You feel like it’s your fault. Because no one really knows what’s going on inside your head, why it started, or how to make it stop, it’s tempting to look for your own answers, especially after getting burned with shitty pill after shitty pill.

Google things like neuroplasticity, and it sure seems like it should be possible to rejigger your brain somehow so the seizures vanish without medication or surgery. You begin to feel like there’s something you’re not doing that you should be doing. What could it be? “What if I avoid stress and caffeine from now on? That ought to stop the seizures from triggering!”

So you experiment a little, cross your fingers … then you have another seizure, and you feel like a failure who places an unfair burden on everyone you care about. I feel like I have it easier than my loved ones, who have to watch it happen or be prepared to rush home at a moment’s notice because I feel an aura coming on.

It could be my fault. There might be something I did or am still doing that led to all this. I may never know, which can be really frustrating sometimes.

What to do for someone having a seizure. There are a lot of first-aid sites that cover this better, but here are a few general points:

  • If the sufferer is thrashing, don’t restrain them. Just make sure they don’t bump into anything.
  • Don’t stick anything in their mouth.
  • When the seizure’s over, turn them on their side (if you can) to open airways.
  • A seizure doesn’t automatically necessitate a trip to the hospital. If the person has a known seizure condition they’re already being treated for, it may be OK for them to stay home. See if there are family or friends nearby who can confirm. When in doubt, call an ambulance.
  • Check for medical IDs that the EMTs can look at when they arrive. It’s important for them to know what medication(s) they’re currently taking, and if they have any allergies.
  • As they’re coming around, be calm and reassuring. They probably have no idea who they are, or why they’re on the ground feeling like crap. When it hits them, they might be accepting, or they might freak out. Again, let them know they’re OK.

Aside from my daily meds, epilepsy isn’t much of a specter in my day-to-day life. The longer I can extend my seizure-free streak, the better. I’m basically training my brain not to do that anymore. There’s a chance I could shed my meds in another few decades of no seizures, but more than likely, I’ll be on them for life, increasing dosage over time to account for my liver adapting to their tricks.

Or, hey- maybe a real neuroplastic therapy will surface, or marijuana will become the seizure stopper. I’m definitely keeping an eye on that front!

** – My EEG is now abnormal in the left temporal lobe. Over time, epilepsy changes your brain, reinforcing the connections that lead to seizures.

Sorry for the rant, but I hope it was informative! Leave any sort of comment you want  :)