Simple Headers
Written on
I remember reading an online article about how headers are very useful and then feeling inspired to create a program that can use plain text headers at the beginning of files. So I wrote a program to parse simple headers.
It really is simple. The computer just has to read the beginning of the file line by line until it encounters a blank line. Each line before that blank line is a key-value association between what is on the left of the colon and what is on the right of the colon. I use this system for almost all of the pages on div0.com, and it makes it easy to add whatever metadata I want to any page.
For example, the header for this page looks like this:
title='Simple Headers' year='2023' month='01' day='22'
I know it is maybe too meta or self-interested to talk about how a blogging system works on that very same blog, but, this simple header system could be so useful for many different applications. It gets around the problem of OS-specific or filesystem-specific metadata fields by putting them at the beginning of the file's actual data, where it is safe.
Also, take a look at the arguments for writing in plain text at this page.