Template for Making Ebooks with Pandoc Markdown

After reading Charles Stross’s article, “Why Microsoft Word Must Die“, the thought occurred that someone, somewhere might be interested in using Pandoc Markdown for generating ebooks.

If you’re writing fiction, Pandoc is probably too nerdy to bother with. You should use Scrivener, which is highly polished and produces fine ebook output with the press of a button. However, if you like to work with a manuscript as a collection of plain text files that you can check into version control, Pandoc fits the bill nicely. It’s a bit easier to understand than Sphinx, and it can handle anything up to moderately complex technical books.

So in case anyone finds it useful, here’s a project you can use to get started: https://github.com/evangoer/pandoc-ebook-template. Pull requests welcome!

Software Backup for Writers

[Cross-posted to the Viable Paradise blog.]

The oldest known printed paper book was published in China well over a thousand years ago. The oldest fragments of Egyptian papyrus have survived over four thousand years.

The lifespan of a manuscript on a hard drive: about five years. A hard disk drive consists of platters that spin at thousands of RPM. Inevitably, these mechanical parts will fail. A solid state drive lacks mechanical parts, but due to unfortunate quantum mechanical effects, it can only record a limited number of writes. As with the hard disk drive, the more you use your solid state drive, the sooner it will degrade and die.

HOWTO fight Entropy (or lose more gracefully)

At a minimum, you should make sure that your work resides on:

  • At least two drives you can access locally
  • At least one drive in an offsite location

Here are a few strategies you can use.

Buy a external hard drive

There’s a good chance your computer only has one drive, particularly if it’s a laptop. The easiest way to rectify this is to buy an external hard drive. Even if funds are tight, please at least consider investing in a second hard drive, as the data on your computer is probably much more valuable than the hardware.

In a pinch, you can use a small USB drive. USB drives are inexpensive (often free, if you’ve mastered the art of lurking around corporate conventions), and they’re usually big enough to store all your documents.

Once you have an external hard drive, you’ll need some software to perform automated backups. Mac OS X systems have a built-in service called Time Machine, and Windows 8 has a similar service called File History. Windows 7 has a simpler backup system called Windows Backup. There are also a plethora of third-party backup software to choose from. Just make sure you have at least some automated system chugging away. Don’t rely on manually dragging your files over to your external drive. You won’t remember to do it.

Set up a network attached storage device

This is the geekier version of buying an external hard drive. A storage device is a fine option if you enjoy tinkering with hardware and software, or if you know someone else who does. Get some friends together and have a FreeNAS build party! Serve pizza! It’ll be awesome.

Alternatively, you can invest in an proprietary storage appliance such as a Drobo. They are very shiny.

Use a cloud service

Google, Zoho, Microsoft, and various smaller independent companies and startups offer online writing tools that store your documents in professionally run data centers. There your documents will be preserved, nearly impossible for anyone to destroy (even if you yourself do your best to try). Many other companies such as Dropbox, Box, Crashplan, and Tarsnap don’t provide authoring tools directly, but enable you to sync and preserve files in general.

The advantage of cloud services is that they handle backup in a sort of Platonic ideal way, without requiring conscious intervention on your part. The disadvantage of cloud services is that the companies that provide them either tend to get bored with their current strategy and/or go out of business. So if you do choose to use a cloud service, be sure to regularly export the documents you care about to some common, popular format and save them on your local systems. For best results, stick with companies that appear to have sustainable business models, and avoid the ones that are just moonlighting or that are in the process of being prepped for sale by their VCs. Further reading: Maciej CegÅ‚owski’s Don’t Be a Free User, Jason Scott’s F**K THE CLOUD (NSFW language).

Use remote version control

The simplest and most common form of version control is to litter your hard drive with files named things like, “My Story 20-Dec-2014.doc”. (It’s okay if you do this. We’re not judging.) A more elegant solution is to use Windows File History or Mac OS X Time Machine. These tools enable you to “go back in time” and restore a file to a previous state.

If you’re not a huge software nerd, this is a fine place to stop.

However, if you are a huge software nerd (or at least a hobbyist), you might consider using a true version control system such as Git or Subversion. Not only do version control systems provide you lots of powerful features, but they also enable you to sync your manuscripts to remote repositories such as GitHub or BitBucket. BitBucket offers private repos for free, which makes it an appealing choice for authors.

Note that version control systems are not the best place to store binary formats such as Word docs. If you’re going so far as to use Git, consider going even even nerdier and writing your books in a plaintext format such as LaTeX, Pandoc Markdown, MultiMarkdown, or reStructuredText.

Take a page (ahem) from our Egyptian and Chinese ancestors

Print your final manuscript out on paper. This is a great way to ensure that at least some version of your work will survive a catastrophe — and will likely even be readable decades from now, when all the software we use today is long, long dead.

If all else fails

Perhaps you ignored all the options above, and your only hard drive failed. Or perhaps you backed up your documents all over the place, and the universe just hates you. The good news is, there are companies that specialize in salvaging data from failed and damaged hard drives. The bad news is, using a data recovery service is a lot like casting Raise Dead: it might not work, and it’ll cost you most of your gold.

Remember: any strategy is better than no strategy

This has just been a short overview of a few possible options. There are many more to think about, and it’s up to you to assemble them into a system that makes sense for you.

Admittedly, it’s hard to get religion about backups if you haven’t been bitten yet. In fact, there’s a good chance your lizard brain is telling you, “Well this backup thing doesn’t sound that scary, and hey, by the way, we’re hungry, doesn’t a snack sound nice right around now?” Ignore your lizard brain! Do something!

In the interest of full disclosure, I’ll admit that I’m not perfectly happy with my backup strategy either. For the record, my strategy these days is: Time Machine to a storage device, plus a remote Git server and DropBox for offsite backup of certain critical projects. That has me covered for some situations. I could be doing a lot more.

What’s your backup strategy? What are you going to do in the next week to make your strategy better, even if just by a little?