Document Renderer Release

I’ve open sourced a simple python script I made that takes my novel and generates a word document each time I update it. Why do I do this? Well, I find on my phone that most document editors (Google Docs, Microsoft Word, etc) can be a bit annoying to use for me. When I’m writing, I don’t want any prompts about being offline, and I don’t want anything to tell me I’ve spelled things wrong. Anything that gets in the way serves to distract me.  How do I get around this? Well, I write plain text documents using a program I first learned how to use in the 90s: Nano. It was similar to other programs I learned how to use when I first learned about computers (namely Pine and the lynx web browser), but it was simpler than Vi for my needs (though I use that occasionally too).  

Nano

Pretty low-tech, right? Some times low tech can mean it’s a good thing. It has the following benefits:

  • It gets out of my way
  • It never has notification popups
  • It never has crashed in all the time I’ve used it.
  • The UI has basically not changed in over 20 years
  • It’s free
  • The UI has a black background and white text which I find is the easiest for me to read.
  • It makes the best use of my phone’s screen limited space
  • Toolbars containing things I’ll never use aren’t present
  • There’s no prompts for misspelled words or grammar, meaning I don’t get distracted. I can write my first draft without feeling I need to stop.
  • I can use the same program on my phone, my linux computer, my windows computer, and even on my old modded Wii.

Sure, I could do a lot of this with word or Google Docs, or Scrivener, or whatever. I’ve tried all of those programs, but for some reason this works best for me, so I’m sticking with it for now.  The only downsides?

  • No cloud storage or automatic backups
  • Not the easiest platform to edit words already written
  • Creates a division between my writing and the word documents I send to editors, etc. (But, I’ve found, this part isn’t necessarily a bad thing)

To combat this, I fill in the gaps with git/github.  This allows me to keep things I’ve written backed up, and even version controlled. I have saved every edit I’ve ever made to the document and can visually see those changes over time. Each line has notes about when it was added, and the reason I added or edited last. I can look at a line, and see the entire history of it with notes I’ve written. I use this for work all the time, so it fits in much better with what I’m used to doing anyway.

git blame screenshot
Git blame, which lists when each line of the document was created and the comment that matches that change

I originally didn’t think this would be useful, but as I’ve improved editing, I’ve found this is quite useful and interesting to see how each paragraph has evolved and changed over the course of my book’s life.

Git diff
You can look at each change you’ve done in a side by side comparison.

The routine I go through when editing a book:

  1. Create an issue in Github issue tracker
  2. Create a branch
  3. Edit my novel to “solve” that issue (e.g. merge two characters together)
  4. Merge my changes back into the document
  5. When I’m ready, I run the script mentioned at the start of the article to turn this into a word document
  6. I then, do a grammar and spelling check, making changes in the original text files (this is the most annoying part) until the document is ready to send off to friends/editors, etc
  7. I get feedback, and then return to the text files again.
Git graph (history of changes)
This shows a history of the changes and a small example in the middle of a branch where you can have multiple copies of your book at the same time.

The reason I’ve found this to be good is that it separates the process I use to create novels. The text documents are for editing, and the word docs are for sharing and publishing. By design I can’t have that fine-grained history and control with word documents, but text files aren’t something I’m going to send off to a publisher either.  It forces me to to treat each edit as a process. If I didn’t have that, then I would struggle as it would be easy to miss steps or get distracted. With this, I know that I need to follow each edit to its conclusion and I can do several edits at the same time without worrying that they’ll cause problems.

Writing a novel is a huge task and can seem overwhelming most of the time. By forcing myself to break things down into small tasks, and to have a detailed history easily visible of my edits, it keeps me motivated for longer.

Are there better ways to do this? Almost definitely. But for me, this is working fine so I’ll keep going using this method for now.

Leave a Reply