Who gets their inspiration for their book from Pokemon?

How I built a pipeline that makes a "We are so Pro - Blue" and "We are so Pro - Red" possible

  • I promise this isn't a political statement
  • This might sound boring, but it excites me so much
  • This is where my nerdy side comes out, be aware

What Does the Pipeline Do?

The way I put together this book is as follows.

  • I have each chapter broken out in separate Open Office files
  • I work on one chapter at a time, and make edits
  • Paste the entire chapter in ChatGPT and have it rate based on pace, transition, and comparing it with stories from Vinyl Cafe (my inspiration)
  • Make edits until I'm happy
  • Then I put the chapters together, and repeat the process for a different chapter
Then I repeat the same process for every chapter on my multiple editing rounds because I always find something I'd like to change.

I'm lazy and didn't didn't like doing that

Naturally, I wanted to create a python script that glues the chapters together, this allows me to remain focused on a single chapter on my editing rounds.

Knowing the "final" round is never actually the final round, I could simply edit the individual chapters instead of making the copy changes in the full manuscript.

Okay, so what?

This actually worked out so much more useful than I expected because it allowed me to:

  • Readjust the order of the chapters at ease
  • Later when I decided I need to anonymize our names to protect everyone's public image, it was super easy
  • Still worked with original names because this helped stay connected to the emotions
  • This is the coolest part. I merged characters simply by replacing multiple people with the same name
  • Now I can run the script once to create the public copy, and run the script again create a copy with the real names

Why LibreOffice?

Then I upgraded to Google Docs for some grammar checks. It was still fine for the most part, until I decided this could actually be a book. There was something that I couldn't figure out how to do. That is the ability to set the page size so it would the spacing of an actual book.

Looks like LibreOffice it is

That's a perfectly sensible question, who even knows LibreOffice?

It wasn't exactly the easiest tool to work with but it provided what I needed at the moment.

Originally all the recaps were written for fun, so they were simply in plain text file, with no grammar check and sent over WhatsApp.

When I decided to make this real, I knew I needed something a bit better to provide me with grammar checks, at a minimum.

So I started with Google Docs

Google Docs, however, didn't let me choose page size, meaning I did not have a good grasp of how many pages this book could be.

But the idea of tabs would have been perfect for separating chapters.

Unfortunately the tabs weren't accessible through AppScript at the time, meaning LibreOffice was really the only free option left for me.

Somehow, it made this pipeline possible. After working with AI because I just don't have the mental energy to learn the relevant library, I had a pipeline that worked. It took some tweaks to get the styles right, but considering how many times I have executed the script.

It was absolutely worth making.

Hit me with the Deetz

Here's essentially what the script did

  1. I supply a list of the chapter files in order
  2. Create a file with all the styling defined, so things like font, spacing, and page sizes
  3. Each chapter was then built using a copy of the main file with all the styling pre-defined
  4. Script goes through each chapters and copies everything element in the file
  5. Replacing real names with their book names.

    This allowed me to write with real people in mind, but still protect their identity when the book comes together

  6. Generate the source of truth copy that contains everything
  7. Generates a PDF file that I can upload for publishing

Enough Talk, show me the real deal

TODO: I will clean up my script and share github link, it's not clean at all but it worked