I hope everyone had a merry Christmas and a happy new year. I was supposed to leave for my grandma’s on Christmas Eve. I was excited to see my grandma, parents, aunt, and uncle. I worked half a day, and drove home to finish packing… when the rumblings started. After an abrupt visit to the bathroom, I became very lethargic and gained a fever. I slept for a few hours, and called my mom to let her know that I wouldn’t be arriving on Christmas Eve. She informed me that she was very sick, too. She was in worse shape than I was. I decided to stay home if her condition would be mine in a few days.
On Christmas, I felt really good. I had a few sniffles, but the fever was gone. I actually felt energized. I called my mom, but she did not pick up. My dad informed me she was pretty much only sleeping. Again, I thought that could be me at any moment, so I continued with my plan to stay home.
With time and not feeling too bad, I decided to get a few things done around my house. I decided to clean up my bookcase and inventory all of my books. I had a database I used to track my reading habits, but I decided to build a new database in LibreOffice Base. I started inputting my existing data, and started adding every book I owned. Surprisingly, this only took two days to inventory over 200 books. I discovered some Diablo books I needed to buy in the process, so I bought those as well. I had books stacked awkwardly on shelves in my bookcase, so I moved some to a tote. My plan is to buy a new bookcase this summer; I’m hoping to have one custom made for me.
I took a weird break from reading last year. I got hung up on it after reading some C.S. Lewis, and never got back into the habit. I got fired up after handling all of those books I have not read; I am already on my third book this year. I read Disorderly Conduct by a retired FBI agent, and Blood, Sweat, and Pixels by Jason Schreier. I am currently reading Play Nice by him as well. Jason’s books are providing some really interesting insight on how video games are made; Play Nice is an incredible peak behind the curtain of Blizzard’s development history.
I have been working on another project. I want to archive all of my blog posts. At first glance, this might sound easy. However, I have over 600 blog posts in four different formats! I have done a lot of work to preserve and update my old blog posts. I archived all of my Blogger posts, did some minor formatting tweaks (like adding paragraphs), and put them here. I did similar archiving of my static posts from Royfuss, transforming this into this. I edited my early WordPress posts by making sure they remained compatible with WordPress and adding categories. And then there are the “Games of Remaster,” which live on an island by themselves.
I had a vision in mind for this project. There are static site generators. The basic concept for blogs is simple. You write posts (usually in markdown), and scripts generate a website around the posts. The sites require no backends, like databases. Statically generated sites usually perform better for end users. Since there is no backend, less can go wrong. For example, a corrupted database is no longer an issue. I worry that my database might give up one day, and I’ll lose some blog posts (even though I do backups). Making the archives statically generated will allay my worries somewhat; I can keep a local copy, as well as back it up however I wish.
I needed several scripts to accomplish my game plan. First, I needed to gather all of my blog posts. I created scripts to download my blog posts from all four sources. This was easy with Python. My scripts just take the raw HTML from all of the blog posts, and saves them all into individual files. The scripts generate file names based on publish date and time, and the post title, which required a little extra work. I finished those scripts quickly.
The next set of scripts needed to format them into a more universal format. Most static site generators need posts to be in Markdown. I am not a fan of Markdown, and decided to stick with HTML. However, I needed to reformat things, like images, into a more general code. These scripts are intense. They comb through the raw files line-by-line. I did not do things efficiently, as I wanted to make sure I did not miss anything. Each line was checked against a long list of criteria, and would format them as needed. In the event a criteria wasn’t met, the script errored out so I could look at the line, and determine more logic to bulk up the list. This took a long time, especially for the WordPress posts.
After getting the formatted posts, I manually read through every single posts to make changes. I needed to add categories to my static Royfuss posts, and I needed to edit the ones for Ruckus. I did a lot of work on the old posts, like removing unnecessary links, and adding author notes. There was a lot to review and update in those old posts, and I really should update the originals with my changes. I did a lot of re-formatting of the “Games of Remaster” posts. I ended up applying my changes to the current ones. Right now, I am going through all my WordPress posts, and updating things in all of them. After those are done, I can re-run my get and format scripts for WordPress posts, and add them to the pile.
The last script needs to take those posts and build the archive site. I have all my ideas planned out, but this script will require a lot of work. I am looking forward to getting to that point, but I worry that it will unearth stuff I missed. At this point, I have read through all of the posts so many times that I feel like I have relived my life multiple times. It’s weird.