💾 Archived View for d.moonfire.us › blog › 2018 › 08 › 21 › mfgames-writing-reasons captured on 2023-01-29 at 03:32:26. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-07-16)

➡️ Next capture (2023-04-26)

🚧 View Differences

-=-=-=-=-=-=-

The Evolution of MfGames Writing

Up a Level

If I wrote the reasons and methods I got to this point, I haven't either tagged[1] properly or never got around to writing it. Regardless, here is a very brief history of these tools and how they evolved up to this point. Hopefully it will explain why I did certain things and which problems I was trying to solve.

1: /tags/mfgames-writing/

Series

I appear to be writing a short series of post about the tools I use for publication and writing.

2: /blog/2018/08/13/publishing-processes/

3: /blog/2018/08/22/mfgames-writing-init/

4: /blog/2018/08/23/mfgames-writing-content/

5: /blog/2018/08/24/mfgames-writing-docker-and-ci/

6: /blog/2018/08/25/mfgames-writing-formats/

7: /blog/2018/08/26/mfgames-writing-themes/

8: /blog/2018/08/27/mfgames-writing-releases/

Markdown and YAML

Let's start with the start of this: I write in Markdown. I've written a few posts[9] about the process and reasons, so I won't go into those. If you want a short version: text files don't corrupt and source control means I can work across multiple machines without accidently deleting an entire chapter.

9: /tags/markdown/

The problem with Markdown is that most people don't want to read a text file. It has no formatting. It doesn't look pretty. It also doesn't go into books very well. Normally, to get around this, many authors use tools like Microsoft Word or Scrivner[10] (which I recommend to non-technical writers) which allow for writing a story/novel and then formatting it into something usable for readers. I don't use Scrivner myself because it uses binary files (doesn't play well with Git) and doesn't run nicely on Linux (my primary platform).

10: https://www.literatureandlatte.com/scrivener/overview

Most people aren't burdened by these self-inflicted limitations.

I also use YAML to keep track of useful information about the page.

Model-View-Controller as Applied to Writing

In development, there is the concept of the Model-View-Controller[11]. This consists of three parts:

11: https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller

The nice thing is that when writing in Markdown, I don't worry about formatting. I have four basic things: bold, italic, blockquotes, and section breaks. I don't really need anything else because of my writing style. I also think this contributes to my productivity, if I can't play with it, I can't distract myself. This is basically the model of my novel; the chunky bits in a text file that constitute the contents of the novel.

The view is what takes that Markdown + YAML file and generates something useful or pretty out of it. That can include:

12: https://fedran.com/sand-and-blood/chapter-01/

13: https://fedran.com/sand-and-blood/dmoonfire-100-00-sand-and-blood-3.1.0.pdf

14: https://fedran.com/sand-and-blood/dmoonfire-100-00-sand-and-blood-3.1.0.epub

The controller is what I write with the novel. I basically use Atom[15] or Notepad++. This is also where Author Intrusion[16] will fit into the process.

15: https://atom.io/

16: /tags/author-intrusion/

The nice part about having the contents (the model) and the output (the view) is that they are completely separate in this step. If I decided to change the font of my books, I just update the view and reformat the books. All the words and everything will come over and I will just have a new appearance. The same if I want to change how epigraphs are formatted or want to support a new ebook format.

Automation

Having a separate view from the model also means I can automate the process of formatting and typesetting the book. This is useful because it is a tedious job formatting the book. Yes, I don't do it that often but I also like consistency. So as my “style” evolves, I also find that I go back and tweak the previous versions for consistency. For example, I moved from a 2 cm lead on the chapter pages to a 4 cm because I thought it looked better. I also made the epigraph a little larger because I can read 8 pt font easily but not everyone else.

Automation also takes out the little details that throw me. I know some books that start with “Chapter 1” and “Chapter 2”, but somewhere in the middle they switch to “Chapter Twenty-Two”. Or sometimes using typographical quotes and other time using ticks. These are things that will throw out a detail-oriented person (like me) but I also feel make an unprofessional looking book.

These are things that Microsoft Word and Scrivner will do, some better than others. I want the same thing because my goal is to create as technically correct and beautiful book as I can possibly create.

MfGames Writing sits in this place, to automate the formatting and handle all of the little details while giving me the ability to focus on one thing—the words—and let computers handle the rest.

Early Versions

When I started this epic quest of trying to automate formatting and typesetting, I started with a simple program: Make. It basically used a few tools in Linux to transform the Markdown into something usable. Shell scripts ended up not being enough, so I supplemented those with a combination of Perl, Python, and C# tools. Each language had its strengths and weaknesses (the biggest is how they handle Unicode since I use accents heavily).

Where most people write a little game or card program with new languages, I write a publication system.

At the time, those languages didn't have good support for installation. Both Perl and Python have a tendency to install packages for the entire machine or a user. C# didn't have NuGet at the time, so it was copying files around (plus it was always the weakest of the three implementations). This meant I could only have one version at a time, so I basically directed everything to my `/home/mfgames-writing/` folder and used that.

Which… was good enough until I started changing my build process. I've been using this for about a hundred books and short stories now. The novels were the hardest because I would add features for fancy headers (like the PlayStation controller on top of Fangs for Nothing[17]) or epigraphs in my page. As I went along, the process got better.

17: https://typewriter.press/shannon-ryan/fangs-for-nothing/

It also broke older versions. A template would change, or the flow. I started having to have `v1`, `v2`, and `v6` hanging around because of the drastic changes as the tools got better at formatting and typesetting. Every time I would rewrite it, I would have slightly different input because of the language changes, and that would break older ones.

That's when I realized I needed to be able to “pin” a version of the tools for a specific book.

The latest attempt at C# was to take advantage of NuGet but then I realized the default NuGet implementation also created a machine-wide version.

I'm aware there are virtual environments for Python. I didn't know about them at the time. After I've played with them, I still find them a bit cumbersome compared to using the approach I went with.

TypeScript and NPM

I finally figured it out when I started playing with TypeScript. I like learning new languages and I was looking for a replacement for my scripting language (I'm very good at Perl and pretty good at Python). One of the tools with JavaScript based languages is NPM[18] which is the package management (much like NuGet).

18: https://npmjs.com/

The beauty of NPM is that it is self-contained inside the development projects. All of the required files go into `node_modules/` which means that each project is a folder that contains everything it needs to run and build. This also means that different projects can have different versions of the same library.

This ended up being the solution I went with. A self-contained, project-level packaging system that would let me evolve the tools for one version but still keep another novel at an earlier vesion so it doesn't break.

Fast-forward about a year of coding and tooling and we get to where we are, MfGames Writing.

Metadata

Categories:

Programming

Writing

Tags:

Markdown

MfGames Writing

Footer

Below are various useful links within this site and to related sites (not all have been converted over to Gemini).

Contact

Biography

Bibliography

Support

Fiction

Fedran

Coding

The Moonfires

Categories

Tags

Privacy

Colophon

License

Mailing List

https://d.moonfire.us/blog/2018/08/21/mfgames-writing-reasons/