Nonchalant Guidance

About Me·RSS·My Projects·LinkedIn

Added on: Friday, 30 July, 2021 | Updated on: Thursday, 02 March, 2023

How I write on this website

A more detailed look

I like the Unix philosophy a lot, that is,

This was the basis of blog-helper, a small Python program I started to write in May of 2021 in order to facilitate easy maintainence of my blog. If you’re curious, you can take a look at blog-helper at my GitHub repository, take a look at my code, and make some suggestions on how to make it better.

Why not use a readymade solution, you may ask? Well, I took this project mostly as a learning opportunity, really to polish up my Python skills and get my feet wet with web development.

So, after roughly 2 months of development (really more like 5-6 hours of development spread over 2 months), I have a pretty functional program that does most of the work for me.

The main things that blog-helper does are as follows:

This seems to be a big list for “write program that does one thing and one thing well”, but this is what a "blog helper’ needs to do in my opinion. All of these tasks are mundane and can be easily automated. This allows me to focus on the writing, which is obviously the most important part of a blog.

For the language, I chose Python. Shell scripts would’ve probably been better, however, I am not an expert in them. I am learning as of the writing of this article, but since I am more familiar in Python, and Python programs can also run on Windows without the need of WSL, so this program may be more suitable for even more people out there.

However, you will notice I left writing the actual article out of the list of things blog-helper does. This is because I prefer writing Markdown in neovim. The “vi family” of text editors are pretty much ubiquitous in POSIX based systems, and learning how to use it further enhances my skills. Markdown is simple and gets out of the way, kind of like neovim.

To convert the article into an HTML file, I use pandoc. It’s a really nifty tool for converting different types of text files, and I highly recommend it. After pandoc has done it’s thing, I just use blog-helper and then commit to the git repository where this website sits.

I primarily designed blog-helper for my own website, however, I’ve tried as best I can to make sure blog-helper can be used in any website out there.

You can also see that the “incomplete” nature of blog-helper benefits different workflows. Someone could skip the whole Markdown to HTML conversion by just writing HTML by themselves or with some other tool and then use blog-helper directly. Someone else might not even care about RSS and can even turn it off using the config file that’s generated automatically.

Of course, blog-helper is not perfect. It’s missing features that I didn’t really think about too much. For example, the provision to strip away polish is a function that came in handy for updating the polish, but I added an option for the user to see the raw webpage around the same time I was writing this article! However, any time I encounter this, I just spend 5-10 minutes adding the feature into blog-helper and then go on my merry way.

To sum up,

This website was made using Markdown, Pandoc, and a custom program to automatically add headers and footers (including this one) to any document that’s published here.

Copyright © 2023 Saksham Mittal. All rights reserved. Unless otherwise stated, all content on this website is licensed under the CC BY-SA 4.0 International License