Building my own things
TL;DR I’ve been thinking lately about how I use my computer, and how I can improve my workflow — by building my own stuff.
I wrote about Wesley’s amazing website multiple times in the past. While his writing is amazing, what I like most about his site is the way he built it. He basically wrote a static site generator, with exactly the things he needed, in plain Bash. That’s cool!
And then a while back while reading some blogs, I stumbled upon Linus’ blog. In addition to his blog (which is also very interesting btw), he has also written a whole suit of programs and tools for personal use. Everything from a calendar, to a notes app, to a fricking search engine — all in his own programming language. That’s even cooler!
It was really inspiring to me — I want that. I want to build my own tools. So I made a plan.
The Plan
I want my tools to run in two places:
- On the Unix commandline.
- As lightweight pages on the Web.
I’ve found the perfect tools for the job:
Here’s some things I want to make:
-
netcat: A tool that prints the content of a remote resource, similar to
cat
on your fs. It should cache the response in~/.cache
. If the resource is requested again, it checks whether the last modified date of the cached version is within the last X (let’s say 30) days. If the file has “expired” and there is an internet connection available, ask the server for a new version (with theLast-Modified
orETag
headers). -
open: An application opener. Looks at the URL scheme or mime type of the input and checks which application to launch. Falls back to
xdg-open
if the mime type hasn’t been configured.
And I want to replace Bix with separate tools:
-
bix: A tool that basically wraps language-specific tools like
npm
,cargo
,mix
. It detects what language you’re using, and the delegates to the corresponding tool. This means one CLI interface that works in every project. -
yo: a simple project manager. It should contain useful scripts for performing commands related to project setup, like creating repositories, pulling ignore files, generating files. Basically most of what bix currently does.
-
A Bakefile, which is an improved Makefile.
I’m also planning to write a bunch of Markdown converters:
- md2html: A simple markdown to HTML converter.
- md2gemtext: A simple markdown to gemtext converter.
- md2goph: A simple markdown to gophermap converter.
Together, this should be enough for some bigger projects:
-
A rewrite of my personal blog, Wesley-style.
-
A RSS reader as SSG, as described in my previous blogpost
-
A simple pastebin style app with CLI interface:
$ cat hello.txt | paste | echo https://geheimesite.nl/paste/xxx
/dream