I’ve discovered pandoc

I have discovered pandoc. Oh dear.

It has garnered an immediate place in my backup routine and has filled a gap that my switch from Microsoft Word to LibreOffice Writer created in my editing and proofreading routine.

And I’ve discovered that I like reading the HTML version of my document better than the EPUB when I’m proofreading because paragraphs are spaced automatically instead of appearing in book form and that makes for really easy reading to pick out mistakes.

It’s also super easy to open an HTML file from Dropbox on my phone and tablets.

So, here’s how I made it work for me, in my routine. Maybe you’ll get a few ideas from this that’ll work for you.

First I installed pandoc. It is a command line tool so that’s a big deal for me. I don’t do command line work. I can, if I have to, but only if I’m looking at a cheat sheet. I have no advanced knowledge of command line stuff so what I present here is what I found in the pandoc documentation that worked for me.

One thing I do know how to do is create a .bat file for windows. I know only a few things about that, though, too.

That said, I know just enough to know it would be possible to do the thing I wanted to do once I realized how cool pandoc was.

So, let me start again: I installed pandoc. https://pandoc.org/

I followed the super easy installation method. I downloaded the windows installation file and ran it. :-)

The pandoc website is super easy to browse and I browsed right through the About, Installing, and Getting started pages. I skimmed the Demos and searched a bit of the Documenation at points too, but pandoc is really easy to use if you can just get the command line stuff right.

So here’s a cheat sheet. :D

It’s nothing special, but maybe seeing it will give you ideas.

I store my working files in a structure like this:

\users\myusername\files\publishing\works\series-name\01-book-title\

I do it that way so all my book folders are in the order I wrote them and not in some other random order.

I don’t even bother with the command line / terminal. I put my stuff in a .bat file that I created in notepad. Seriously.

I knew about .bat files and have used them for backing up files in the past. So I combined that with the stuff I discovered about pandoc and made a file that will generate a format for me and save it somewhere just by me clicking the file and “opening” it. .bat files don’t really open so much as they “run” so that’s what’s actually happening.

I click the file to open it and it runs. :D

Oh, and just to note, I’m using Windows 7. I don’t use Windows 10 so I have no idea if this stuff is just as easy there or not.

Once pandoc is installed, just right click in the folder where you store your book file and choose New Text Document from the context menu.

Here are supporting pictures to show me walking through what I did last night but in a dummy folder this time.

I made a new text file.

I named it “formats.bat”.

The file tries to default to “formats.bat.txt,” but I just deleted .txt so that the file is a .bat file. You’ll get a warning. Tell it you know what you’re doing and to rename the file extension.

Since I didn’t want to have to type up a crazy long file path, I had to make sure my file was actually in the directory where I put the .bat file.

If I’d been using one of my real book files like I did last night, this wouldn’t have been necessary because the file would have already been there. But that’s the problem wtih dummy folders. You’ve got to fill them with dummy files. :-)

Now I edit the file and put the pandoc command line stuff in it so that it’ll generate a couple of alternate formats and spit them out.

Here’s what’s in that file for easy copying and pasting:

pandoc book-title.odt -s -o book-title-draft.epub --metadata title="Book Title draft" --metadata author="Your Name"
pandoc book-title.odt -s -o book-title-draft.html --metadata title="Book Title draft" --metadata author="Your Name"

It won’t ask about overwriting files. So BE SURE you don’t mess up those file names and that you don’t mind having the files overwritten.

Just swap out “book-title.odt” for your file name.

Pandoc does handle .docx files too so you could start from that rather than an .odt file like I do. Also swap out the “book-title-draft.epub” (and .html) file for whatever name you’d like. Finally, the –metadata stuff is only relevant to certain file types so it isn’t needed for all conversions, say book-title.odt to book-title.txt. :-)

I use this to generate backup formats for my book, including a plain .txt file, and I actually have the EPUB and HTML files saved to my Dropbox folder instead of the directory it’s in so that I can open that file on my phone and do my editing read-through there or on a tablet.

These will be basic files, nothing fancy, but they are perfect for me to do my editing read-throughs that I do as I go, or as backup formats.

If you’re the type that prefers to start with something other than a blank document, you can take the EPUB or HTML into Sigil or Jutoh and tweak it there at the end if need be. I prefer to import my formatted word processing file for that into Jutoh, but it’s something I might look at just to see about when I get that far with my current book. :-)

It’s a one-click document generation and backup solution.

It is so easy. I love it. :D

Ready to edit today

screenshot of sunlit paper Today I’ll be editing. I have fresh coffee, my document on my Kindle Fire (the oldest one I have), and some fresh sunlit paper and a pencil for notes. I have tablets and journals and pencils and pens everywhere, to be honest. :)

It’s time to edit this book and I want to do it while the story is fresh in my mind. I know that’s opposite of what a lot of authors recommend to other authors, but I have my own way of doing things, for reasons that make sense to me.

Of course, I dated the page yesterday, so that’ll have to be updated, but other than that, I’m ready to go.

With as much sun as is shining onto my face, I’ll have to watch out, but I want the warmth of the sun right now. I find it motivating when it comes time to focus on reading. :)

So here is the plan.

Every chapter will be timed. (I do this to stay focused.) If I need to stop for a break, it’ll come at the end of a chapter. This is helpful so I can get a feel of the momentum in a chapter and pay attention to pacing. If I’m stopping three times in a chapter, I just get to the end and have no idea how fast or slow it felt.

After 3 to 4 chapters, I’ll catch up typo edits and the like, and save all other notes (highlights really) until the end.

This is so I don’t run into an issue with the Kindle losing my highlights. It hasn’t ever happened, but if it does, I don’t want this to be the day. Until I started doing it this way, I regularly ended up with 30+ pages of highlights to deal with all at the end. The horror of losing all that and having to start over is what led me to change my ways.

I’ll be using the notes page to make notes of continuity stuff and things I want to check at the end. I’ll be jotting down eye/hair/clothes/names and a small chapter summary of one or two sentences, too. But I might save that for the end of the chapter so it doesn’t bog me down as I read. This is something new I’m adding to my process so I’m going to have to work out the details as I go.

Anyway, I think I’m ready. I will definitely post a screenshot from my spreadsheet later. :) It’ll be interesting to see it all laid out. The spreadsheet tracks the reading sessions, and using it and the timer has worked really well to keep me completely focused on reading.

It’s also cut the time it takes me to do the read through by a significant degree. It used to take a week at least. Now it takes a day (or two).

This is the kind of thing I’m hoping to find with my writing someday. A process that just works.

I haven’t given up looking. But for now, it’s time to focus on edits. :)